gatchat: Fix unused variable cases

This commit is contained in:
Marcel Holtmann 2011-05-27 09:52:31 -07:00
parent f13bedd9dc
commit 3297a3e865
2 changed files with 17 additions and 0 deletions

View File

@ -95,13 +95,28 @@ static void hdlc_record(int fd, gboolean in, guint8 *data, guint16 length)
ts = htonl(now.tv_sec & 0xffffffff);
id = 0x07;
err = write(fd, &id, 1);
if (err < 0)
return;
err = write(fd, &ts, 4);
if (err < 0)
return;
id = in ? 0x02 : 0x01;
err = write(fd, &id, 1);
if (err < 0)
return;
err = write(fd, &len, 2);
if (err < 0)
return;
err = write(fd, data, length);
if (err < 0)
return;
}
void g_at_hdlc_set_recording(GAtHDLC *hdlc, const char *filename)

View File

@ -87,6 +87,8 @@ void ppp_net_process_packet(struct ppp_net *net, const guint8 *packet)
len = get_host_short(&packet[2]);
status = g_io_channel_write_chars(net->channel, (gchar *) packet,
len, &bytes_written, NULL);
if (status != G_IO_STATUS_NORMAL)
return;
}
/*