summaryrefslogtreecommitdiff
path: root/gatchat/gathdlc.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2011-05-27 09:52:31 -0700
committerMarcel Holtmann <marcel@holtmann.org>2011-05-27 09:52:31 -0700
commit3297a3e865daadbedd1d03b1e50bddc32c0254b5 (patch)
tree7a818390c5f7d2521f5d4c63f8a3bb7037514076 /gatchat/gathdlc.c
parentf13bedd9dc1cd9a6e373bf686475e8713c10a605 (diff)
downloadofono-3297a3e865daadbedd1d03b1e50bddc32c0254b5.tar.gz
gatchat: Fix unused variable cases
Diffstat (limited to 'gatchat/gathdlc.c')
-rw-r--r--gatchat/gathdlc.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gatchat/gathdlc.c b/gatchat/gathdlc.c
index 1d5f239c..130e3cce 100644
--- a/gatchat/gathdlc.c
+++ b/gatchat/gathdlc.c
@@ -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)