diff options
author | Denis Kenzior <denkenz@gmail.com> | 2011-05-02 07:13:52 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2011-05-02 07:15:41 -0500 |
commit | dc86e864463a61d3f99a21c948c11ba274c6ef84 (patch) | |
tree | c162365e1754705026b1f17feb2c76030a919434 /gatchat | |
parent | 94d6d505eeda4db0a28aea99bf3ab23a62a65f2c (diff) | |
download | ofono-dc86e864463a61d3f99a21c948c11ba274c6ef84.tar.bz2 |
gathdlc: Make sure to set in_read_handler properly
Diffstat (limited to 'gatchat')
-rw-r--r-- | gatchat/gathdlc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gatchat/gathdlc.c b/gatchat/gathdlc.c index 00d9daf0..e3ab7ec9 100644 --- a/gatchat/gathdlc.c +++ b/gatchat/gathdlc.c @@ -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 |