gathdlc: Make sure to set in_read_handler properly

This commit is contained in:
Denis Kenzior 2011-05-02 07:13:52 -05:00
parent 94d6d505ee
commit dc86e86446
1 changed files with 4 additions and 4 deletions

View File

@ -225,10 +225,6 @@ static void new_bytes(struct ring_buffer *rbuf, gpointer user_data)
unsigned char *buf = ring_buffer_read_ptr(rbuf, 0);
unsigned int pos = 0;
hdlc_record(hdlc->record_fd, TRUE, buf, wrap);
hdlc->in_read_handler = TRUE;
/*
* We delete the the paused_timeout_cb or hdlc_suspend as soons as
* we read a data.
@ -246,6 +242,10 @@ static void new_bytes(struct ring_buffer *rbuf, gpointer user_data)
return;
}
hdlc_record(hdlc->record_fd, TRUE, buf, wrap);
hdlc->in_read_handler = TRUE;
while (pos < len) {
/*
* We try to detect NO CARRIER conditions here. We