diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-04-24 19:00:54 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-04-24 19:00:54 +0200 |
commit | 46839fbd15511867cd3a4ebcd69e4dd3896b1e6d (patch) | |
tree | b3eb1ff14ed068c4938503dc877f721c15ef0318 /gatchat | |
parent | 8f05535bb280bb8f957e179241fb6134b947e48a (diff) | |
download | ofono-46839fbd15511867cd3a4ebcd69e4dd3896b1e6d.tar.bz2 |
Allow real wrapping around of HDLC transmit ring buffer
Diffstat (limited to 'gatchat')
-rw-r--r-- | gatchat/gathdlc.c | 4 |
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)) |