From bee7eba2654ceb34de5a6d29399e6dc6c5d4a9b5 Mon Sep 17 00:00:00 2001 From: idgay Date: Mon, 16 Jul 2007 15:58:16 +0000 Subject: [PATCH] non-blocking read fix from Steve McKown --- support/sdk/c/serialsource.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/support/sdk/c/serialsource.c b/support/sdk/c/serialsource.c index 2da6968c..4e4afabd 100644 --- a/support/sdk/c/serialsource.c +++ b/support/sdk/c/serialsource.c @@ -627,11 +627,11 @@ void *read_serial_packet(serial_source src, int *len) the serial source is in non-blocking mode */ { + read_and_process(src, TRUE); for (;;) { struct packet_list *entry; - read_and_process(src, src->non_blocking); entry = pop_protocol_packet(src, P_PACKET_NO_ACK); if (entry) { @@ -645,6 +645,7 @@ void *read_serial_packet(serial_source src, int *len) if (src->non_blocking && serial_source_empty(src)) return NULL; source_wait(src, NULL); + read_and_process(src, src->non_blocking); } } -- 2.39.2