Allow real wrapping around of HDLC transmit ring buffer

This commit is contained in:
Marcel Holtmann 2010-04-24 19:00:54 +02:00
parent 8f05535bb2
commit 46839fbd15
1 changed files with 2 additions and 2 deletions

View File

@ -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))