From: Quentin Young Date: Thu, 26 Apr 2018 04:19:40 +0000 (-0400) Subject: zebra: fix zserv_read rescheduling X-Git-Tag: frr-6.1-dev~363^2~4 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=43ea2c7609c953b1e553494374e277a9fc2d9b69;p=mirror_frr.git zebra: fix zserv_read rescheduling Incorrect decrement operation resulted in always rescheduling instead of only when needed. Signed-off-by: Quentin Young --- diff --git a/zebra/zserv.c b/zebra/zserv.c index 740926e1a..1effb2b2b 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -299,7 +299,7 @@ static int zserv_read(struct thread *thread) sock = THREAD_FD(thread); client = THREAD_ARG(thread); - while (p2p--) { + while (p2p) { ssize_t nb; bool hdrvalid; char errmsg[256]; @@ -392,6 +392,7 @@ static int zserv_read(struct thread *thread) stream_fifo_push(cache, msg); stream_reset(client->ibuf_work); + p2p--; } if (p2p < p2p_orig) {