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
This commit is contained in:
Richard Mudgett 2010-01-29 19:32:58 +00:00
parent 3995397fa3
commit f80fa82b33

7
q921.c
View File

@ -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;
}