log: fix processing of incomplete lines
authorFelix Fietkau <nbd@openwrt.org>
Sat, 29 Dec 2012 17:54:54 +0000 (18:54 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 29 Dec 2012 17:54:54 +0000 (18:54 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
main.c

diff --git a/main.c b/main.c
index 56851e024868885191d94205c78c676066974bcc..c1f55e9fe13cd18632605cab90e3fb15b2bb38dd 100644 (file)
--- a/main.c
+++ b/main.c
@@ -111,7 +111,9 @@ netifd_process_log_read_cb(struct ustream *s, int bytes)
                        netifd_log_message(L_NOTICE, "%s (%d): %s [...]\n",
                                log_prefix, proc->uloop.pid, data);
                        proc->log_overflow = true;
-               }
+               } else
+                       break;
+
                ustream_consume(s, len);
        } while (1);
 }