summaryrefslogtreecommitdiffstats
path: root/gatchat/gathdlc.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-06-29 11:46:20 -0500
committerDenis Kenzior <denkenz@gmail.com>2010-06-29 11:46:20 -0500
commitaca0fdf87f48f2c2766c014f3f1815b2ebf8e63b (patch)
treef431d978b28eda0d127640c33281ed239d6a4acf /gatchat/gathdlc.c
parent1afd51a8c70ca82219a045589168cc59564d53f3 (diff)
downloadofono-aca0fdf87f48f2c2766c014f3f1815b2ebf8e63b.tar.bz2
hdlc: Don't bother recording empty packets
Diffstat (limited to 'gatchat/gathdlc.c')
-rw-r--r--gatchat/gathdlc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gatchat/gathdlc.c b/gatchat/gathdlc.c
index 9624bbd7..735a9d43 100644
--- a/gatchat/gathdlc.c
+++ b/gatchat/gathdlc.c
@@ -79,6 +79,9 @@ static void hdlc_record(int fd, gboolean in, guint8 *data, guint16 length)
if (fd < 0)
return;
+ if (len == 0)
+ return;
+
gettimeofday(&now, NULL);
ts = htonl(now.tv_sec & 0xffffffff);