summaryrefslogtreecommitdiffstats
path: root/gatchat
diff options
context:
space:
mode:
Diffstat (limited to 'gatchat')
-rw-r--r--gatchat/gathdlc.c8
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