summaryrefslogtreecommitdiffstats
path: root/gatchat/gathdlc.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-04-24 19:00:54 +0200
committerMarcel Holtmann <marcel@holtmann.org>2010-04-24 19:00:54 +0200
commit46839fbd15511867cd3a4ebcd69e4dd3896b1e6d (patch)
treeb3eb1ff14ed068c4938503dc877f721c15ef0318 /gatchat/gathdlc.c
parent8f05535bb280bb8f957e179241fb6134b947e48a (diff)
downloadofono-46839fbd15511867cd3a4ebcd69e4dd3896b1e6d.tar.bz2
Allow real wrapping around of HDLC transmit ring buffer
Diffstat (limited to 'gatchat/gathdlc.c')
-rw-r--r--gatchat/gathdlc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gatchat/gathdlc.c b/gatchat/gathdlc.c
index f56fb488..1c2c3c53 100644
--- a/gatchat/gathdlc.c
+++ b/gatchat/gathdlc.c
@@ -348,7 +348,7 @@ gboolean g_at_hdlc_send(GAtHDLC *hdlc, const unsigned char *data, gsize size)
pos++;
if (pos == wrap)
- return FALSE;
+ buf = ring_buffer_write_ptr(hdlc->write_buffer, pos);
}
if (i < size)
@@ -376,7 +376,7 @@ gboolean g_at_hdlc_send(GAtHDLC *hdlc, const unsigned char *data, gsize size)
pos++;
if (pos == wrap)
- return FALSE;
+ buf = ring_buffer_write_ptr(hdlc->write_buffer, pos);
}
if (i < sizeof(tail))