From f80fa82b33fab321da8d6c4277d5dc9b7dce4672 Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Fri, 29 Jan 2010 19:32:58 +0000 Subject: [PATCH] Only set eres if there actually is an event to pass up. (issue 16713) git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1451 2fbb986a-6c06-0410-b554-c9c1f0a7f128 --- q921.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/q921.c b/q921.c index 1370bbd..4f9a7ae 100644 --- a/q921.c +++ b/q921.c @@ -1629,12 +1629,7 @@ static pri_event *q921_iframe_rx(struct pri *pri, q921_h *h, int len) //res = q931_receive(PRI_MASTER(pri), pri->tei, (q931_h *)h->i.data, len - 4); res = q931_receive(pri, pri->tei, (q931_h *)h->i.data, len - 4); - - if (res == -1) { - eres = NULL; - } - - if (res & Q931_RES_HAVEEVENT) { + if (res != -1 && (res & Q931_RES_HAVEEVENT)) { eres = &pri->ev; }