mirror of git://git.sysmocom.de/ofono
Allow real wrapping around of HDLC transmit ring buffer
This commit is contained in:
parent
8f05535bb2
commit
46839fbd15
|
@ -348,7 +348,7 @@ gboolean g_at_hdlc_send(GAtHDLC *hdlc, const unsigned char *data, gsize size)
|
||||||
pos++;
|
pos++;
|
||||||
|
|
||||||
if (pos == wrap)
|
if (pos == wrap)
|
||||||
return FALSE;
|
buf = ring_buffer_write_ptr(hdlc->write_buffer, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i < size)
|
if (i < size)
|
||||||
|
@ -376,7 +376,7 @@ gboolean g_at_hdlc_send(GAtHDLC *hdlc, const unsigned char *data, gsize size)
|
||||||
pos++;
|
pos++;
|
||||||
|
|
||||||
if (pos == wrap)
|
if (pos == wrap)
|
||||||
return FALSE;
|
buf = ring_buffer_write_ptr(hdlc->write_buffer, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i < sizeof(tail))
|
if (i < sizeof(tail))
|
||||||
|
|
Loading…
Reference in New Issue