[svn-commits] rmudgett: tag 1.4.11.5 r2132 - /tags/1.4.11.5/q931.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Nov 17 15:19:23 CST 2010
Author: rmudgett
Date: Wed Nov 17 15:19:19 2010
New Revision: 2132
URL: http://svnview.digium.com/svn/libpri?view=rev&rev=2132
Log:
Merged revision 1961 from
https://origsvn.digium.com/svn/libpri/branches/1.4
..........
r1961 | rmudgett | 2010-09-07 19:10:05 -0500 (Tue, 07 Sep 2010) | 12 lines
Prevent a CONNECT message from sending a CONNECT ACKNOWLEDGE in the wrong state.
Filter the processing of the CONNECT message to prevent libpri from
sending a CONNECT ACKNOWLEDGE when the call is in an inappropriate state.
This can happen when we hang up an outgoing call after the other end has
sent a CONNECT but before we have processed the CONNECT.
(issue #17360)
Reported by: shawkris
Patches:
issue17360_con_ack_v1.4.patch uploaded by rmudgett (license 664)
..........
Modified:
tags/1.4.11.5/q931.c
Modified: tags/1.4.11.5/q931.c
URL: http://svnview.digium.com/svn/libpri/tags/1.4.11.5/q931.c?view=diff&rev=2132&r1=2131&r2=2132
==============================================================================
--- tags/1.4.11.5/q931.c (original)
+++ tags/1.4.11.5/q931.c Wed Nov 17 15:19:19 2010
@@ -6912,9 +6912,20 @@
q931_release_complete(ctrl,c,PRI_CAUSE_INVALID_CALL_REFERENCE);
break;
}
- if (c->ourcallstate == Q931_CALL_STATE_ACTIVE) {
- q931_status(ctrl, c, PRI_CAUSE_WRONG_MESSAGE);
- break;
+ switch (c->ourcallstate) {
+ case Q931_CALL_STATE_CALL_INITIATED:
+ case Q931_CALL_STATE_OVERLAP_SENDING:
+ case Q931_CALL_STATE_OUTGOING_CALL_PROCEEDING:
+ case Q931_CALL_STATE_CALL_DELIVERED:
+ case Q931_CALL_STATE_CALL_PRESENT:
+ case Q931_CALL_STATE_CALL_RECEIVED:
+ case Q931_CALL_STATE_INCOMING_CALL_PROCEEDING:
+ case Q931_CALL_STATE_OVERLAP_RECEIVING:
+ /* Accept CONNECT in these states. */
+ break;
+ default:
+ q931_status(ctrl, c, PRI_CAUSE_WRONG_CALL_STATE);
+ return 0;
}
UPDATE_OURCALLSTATE(ctrl, c, Q931_CALL_STATE_ACTIVE);
c->peercallstate = Q931_CALL_STATE_CONNECT_REQUEST;
@@ -6934,7 +6945,6 @@
if (c->cis_auto_disconnect && c->cis_call) {
/* Make sure WE release when we initiate a signalling only connection */
q931_hangup(ctrl, c, PRI_CAUSE_NORMAL_CLEARING);
- break;
} else {
c->incoming_ct_state = INCOMING_CT_STATE_IDLE;
@@ -6947,6 +6957,7 @@
return Q931_RES_HAVEEVENT;
}
+ break;
case Q931_FACILITY:
if (c->newcall) {
q931_release_complete(ctrl,c,PRI_CAUSE_INVALID_CALL_REFERENCE);
More information about the svn-commits
mailing list