mirror of git://git.sysmocom.de/ofono
gatio: Kill the reader when no more space
This commit is contained in:
parent
f09ce13ad7
commit
2d2bc8b5b3
|
@ -115,6 +115,10 @@ static gboolean received_data(GIOChannel *channel, GIOCondition cond,
|
|||
if (read_count > 0 && rbytes == 0 && err != G_IO_ERROR_AGAIN)
|
||||
return FALSE;
|
||||
|
||||
/* We're overflowing the buffer, shutdown the socket */
|
||||
if (ring_buffer_avail(io->buf) == 0)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue