[libpri-commits] rmudgett: branch rmudgett/v1.4.11.5 r2117 - /team/rmudgett/v1.4.11.5/

SVN commits to the libpri project libpri-commits at lists.digium.com
Wed Nov 17 10:48:32 CST 2010


Author: rmudgett
Date: Wed Nov 17 10:48:28 2010
New Revision: 2117

URL: http://svnview.digium.com/svn/libpri?view=rev&rev=2117
Log:
Merged revision 1955,1958 from
https://origsvn.digium.com/svn/libpri/branches/1.4

..........
  r1955 | rmudgett | 2010-09-02 12:33:51 -0500 (Thu, 02 Sep 2010) | 1 line

  Don't crash in __pri_new_tei() if a GR303 subchannel creation fails.

  ..........
  r1958 | rmudgett | 2010-09-07 18:13:04 -0500 (Tue, 07 Sep 2010) | 1 line

  Balance curly braces in post_handle_q931_message().
..........

Modified:
    team/rmudgett/v1.4.11.5/pri.c
    team/rmudgett/v1.4.11.5/q931.c

Modified: team/rmudgett/v1.4.11.5/pri.c
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/v1.4.11.5/pri.c?view=diff&rev=2117&r1=2116&r2=2117
==============================================================================
--- team/rmudgett/v1.4.11.5/pri.c (original)
+++ team/rmudgett/v1.4.11.5/pri.c Wed Nov 17 10:48:28 2010
@@ -324,7 +324,7 @@
 		p->subchannel = __pri_new_tei(-1, node, PRI_SWITCH_GR303_EOC_PATH, p, NULL, NULL, NULL, Q921_TEI_GR303_EOC_PATH, 0);
 		if (!p->subchannel) {
 			free(p);
-			p = NULL;
+			return NULL;
 		}
 		break;
 	case PRI_SWITCH_GR303_TMC:
@@ -334,7 +334,7 @@
 		p->subchannel = __pri_new_tei(-1, node, PRI_SWITCH_GR303_TMC_SWITCHING, p, NULL, NULL, NULL, Q921_TEI_GR303_TMC_SWITCHING, 0);
 		if (!p->subchannel) {
 			free(p);
-			p = NULL;
+			return NULL;
 		}
 		break;
 	case PRI_SWITCH_GR303_TMC_SWITCHING:

Modified: team/rmudgett/v1.4.11.5/q931.c
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/v1.4.11.5/q931.c?view=diff&rev=2117&r1=2116&r2=2117
==============================================================================
--- team/rmudgett/v1.4.11.5/q931.c (original)
+++ team/rmudgett/v1.4.11.5/q931.c Wed Nov 17 10:48:28 2010
@@ -7040,16 +7040,24 @@
 		if ((ctrl->debug & PRI_DEBUG_Q931_ANOMALY) &&
 		    (c->cause != PRI_CAUSE_INTERWORKING)) 
 			pri_error(ctrl, "Received unsolicited status: %s\n", pri_cause2str(c->cause));
-		/* Workaround for S-12 ver 7.3 - it responds for invalid/non-implemented IEs at SETUP with null call state */
+		if (
 #if 0
-		if (!c->sugcallstate && (c->ourcallstate != Q931_CALL_STATE_CALL_INITIATED)) {
+			/*
+			 * Workaround for S-12 ver 7.3 - it responds to
+			 * invalid/non-implemented IEs in SETUP with NULL call state.
+			 */
+			!c->sugcallstate && (c->ourcallstate != Q931_CALL_STATE_CALL_INITIATED)
 #else
-		/* Remove "workaround" since it breaks certification testing.  If we receive a STATUS message of call state
-		 * NULL and we are not in the call state NULL we must clear resources and return to the call state to pass
-		 * testing.  See section 5.8.11 of Q.931 */
-
-		if (!c->sugcallstate) {
+			/*
+			 * Remove "workaround" since it breaks certification testing. If
+			 * we receive a STATUS message of call state NULL and we are not
+			 * in the call state NULL we must clear resources and return to
+			 * the call state to pass testing.  See section 5.8.11 of Q.931.
+			 */
+
+			!c->sugcallstate
 #endif
+			) {
 			ctrl->ev.hangup.subcmds = &ctrl->subcmds;
 			ctrl->ev.hangup.channel = q931_encode_channel(c);
 			ctrl->ev.hangup.cause = c->cause;




More information about the libpri-commits mailing list