From 46839fbd15511867cd3a4ebcd69e4dd3896b1e6d Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 24 Apr 2010 19:00:54 +0200 Subject: Allow real wrapping around of HDLC transmit ring buffer --- gatchat/gathdlc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gatchat') 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)) -- cgit v1.2.3