From cea6d541dfd22835fae43787781506d89eabc3cf Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Tue, 14 Dec 2010 01:09:57 +0000 Subject: [PATCH] Return error if q931_notify() cannot send NOTIFY. git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2167 2fbb986a-6c06-0410-b554-c9c1f0a7f128 --- q931.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/q931.c b/q931.c index 8524655..20c0d90 100644 --- a/q931.c +++ b/q931.c @@ -4808,15 +4808,16 @@ int q931_notify(struct pri *ctrl, q931_call *c, int channel, int info) break; default: if ((info > 0x2) || (info < 0x00)) { - return 0; + return -1; } break; } if (info >= 0) { - info = info & 0x7F; + info &= 0x7F; } else { - info = -1; + /* Cannot send NOTIFY message if the mandatory ie is not going to be present. */ + return -1; } return q931_notify_redirection(ctrl, c, info, NULL); }