[svn-commits] trunk r343 - /trunk/q931.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Thu Jun 1 11:00:31 MST 2006


Author: mattf
Date: Thu Jun  1 13:00:31 2006
New Revision: 343

URL: http://svn.digium.com/view/libpri?rev=343&view=rev
Log:
Fixes so that fields are initialized in events from #7241.  Thanks flefoll!

Modified:
    trunk/q931.c

Modified: trunk/q931.c
URL: http://svn.digium.com/view/libpri/trunk/q931.c?rev=343&r1=342&r2=343&view=diff
==============================================================================
--- trunk/q931.c (original)
+++ trunk/q931.c Thu Jun  1 13:00:31 2006
@@ -2645,9 +2645,11 @@
 	pri->schedev = 1;
 	pri->ev.e = PRI_EVENT_HANGUP_ACK;
 	pri->ev.hangup.channel = c->channelno;
+	pri->ev.hangup.cause = c->cause;
 	pri->ev.hangup.cref = c->cr;
-	pri->ev.hangup.cause = c->cause;
 	pri->ev.hangup.call = c;
+	pri->ev.hangup.aoc_units = c->aoc_units;
+	libpri_copy_string(pri->ev.hangup.useruserinfo, c->useruserinfo, sizeof(pri->ev.hangup.useruserinfo));
 	q931_hangup(pri, c, c->cause);
 }
 
@@ -3293,9 +3295,9 @@
 		libpri_copy_string(pri->ev.ring.callednum, c->callednum, sizeof(pri->ev.ring.callednum));
 		libpri_copy_string(pri->ev.ring.origcalledname, c->origcalledname, sizeof(pri->ev.ring.origcalledname));
 		libpri_copy_string(pri->ev.ring.origcallednum, c->origcallednum, sizeof(pri->ev.ring.origcallednum));
-                libpri_copy_string(pri->ev.ring.redirectingnum, c->redirectingnum, sizeof(pri->ev.ring.redirectingnum));
-                libpri_copy_string(pri->ev.ring.redirectingname, c->redirectingname, sizeof(pri->ev.ring.redirectingname));
-                libpri_copy_string(pri->ev.ring.useruserinfo, c->useruserinfo, sizeof(pri->ev.ring.useruserinfo));
+		libpri_copy_string(pri->ev.ring.redirectingnum, c->redirectingnum, sizeof(pri->ev.ring.redirectingnum));
+		libpri_copy_string(pri->ev.ring.redirectingname, c->redirectingname, sizeof(pri->ev.ring.redirectingname));
+		libpri_copy_string(pri->ev.ring.useruserinfo, c->useruserinfo, sizeof(pri->ev.ring.useruserinfo));
 		c->useruserinfo[0] = '\0';
 		pri->ev.ring.redirectingreason = c->redirectingreason;
 		pri->ev.ring.origredirectingreason = c->origredirectingreason;
@@ -3322,7 +3324,7 @@
 		pri->ev.ringing.call = c;
 		pri->ev.ringing.progress = c->progress;
 		pri->ev.ringing.progressmask = c->progressmask;
-                libpri_copy_string(pri->ev.ringing.useruserinfo, c->useruserinfo, sizeof(pri->ev.ring.useruserinfo));
+		libpri_copy_string(pri->ev.ringing.useruserinfo, c->useruserinfo, sizeof(pri->ev.ringing.useruserinfo));
 		c->useruserinfo[0] = '\0';
 		return Q931_RES_HAVEEVENT;
 	case Q931_CONNECT:
@@ -3342,7 +3344,7 @@
 		pri->ev.answer.call = c;
 		pri->ev.answer.progress = c->progress;
 		pri->ev.answer.progressmask = c->progressmask;
-                libpri_copy_string(pri->ev.answer.useruserinfo, c->useruserinfo, sizeof(pri->ev.ring.useruserinfo));
+		libpri_copy_string(pri->ev.answer.useruserinfo, c->useruserinfo, sizeof(pri->ev.answer.useruserinfo));
 		c->useruserinfo[0] = '\0';
 		q931_connect_acknowledge(pri, c);
 		if (c->justsignalling) {  /* Make sure WE release when we initiatie a signalling only connection */
@@ -3428,9 +3430,11 @@
 		/* Workaround for S-12 ver 7.3 - it responds for invalid/non-implemented IEs at SETUP with null call state */
 		if (!c->sugcallstate && (c->ourcallstate != Q931_CALL_STATE_CALL_INITIATED)) {
 			pri->ev.hangup.channel = c->channelno | (c->ds1no << 8) | (c->ds1explicit << 16);
-			pri->ev.hangup.cref = c->cr;          		
-			pri->ev.hangup.cause = c->cause;      		
-			pri->ev.hangup.call = c;              		
+			pri->ev.hangup.cause = c->cause;
+			pri->ev.hangup.cref = c->cr;
+			pri->ev.hangup.call = c;
+			pri->ev.hangup.aoc_units = c->aoc_units;
+			libpri_copy_string(pri->ev.hangup.useruserinfo, c->useruserinfo, sizeof(pri->ev.hangup.useruserinfo));
 			/* Free resources */
 			c->ourcallstate = Q931_CALL_STATE_NULL;
 			c->peercallstate = Q931_CALL_STATE_NULL;
@@ -3454,10 +3458,11 @@
 		c->ourcallstate = Q931_CALL_STATE_NULL;
 		c->peercallstate = Q931_CALL_STATE_NULL;
 		pri->ev.hangup.channel = c->channelno | (c->ds1no << 8) | (c->ds1explicit << 16);
-		pri->ev.hangup.cref = c->cr;          		
-		pri->ev.hangup.cause = c->cause;      		
-		pri->ev.hangup.call = c;              		
-                libpri_copy_string(pri->ev.hangup.useruserinfo, c->useruserinfo, sizeof(pri->ev.ring.useruserinfo));
+		pri->ev.hangup.cause = c->cause;
+		pri->ev.hangup.cref = c->cr;
+		pri->ev.hangup.call = c;
+		pri->ev.hangup.aoc_units = c->aoc_units;
+		libpri_copy_string(pri->ev.hangup.useruserinfo, c->useruserinfo, sizeof(pri->ev.hangup.useruserinfo));
 		c->useruserinfo[0] = '\0';
 		/* Free resources */
 		if (c->alive) {
@@ -3488,11 +3493,11 @@
 		c->ourcallstate = Q931_CALL_STATE_NULL;
 		pri->ev.e = PRI_EVENT_HANGUP;
 		pri->ev.hangup.channel = c->channelno | (c->ds1no << 8) | (c->ds1explicit << 16);
+		pri->ev.hangup.cause = c->cause;
 		pri->ev.hangup.cref = c->cr;
-		pri->ev.hangup.cause = c->cause;
 		pri->ev.hangup.call = c;
 		pri->ev.hangup.aoc_units = c->aoc_units;
-                libpri_copy_string(pri->ev.hangup.useruserinfo, c->useruserinfo, sizeof(pri->ev.ring.useruserinfo));
+		libpri_copy_string(pri->ev.hangup.useruserinfo, c->useruserinfo, sizeof(pri->ev.hangup.useruserinfo));
 		c->useruserinfo[0] = '\0';
 		/* Don't send release complete if they send us release 
 		   while we sent it, assume a NULL state */
@@ -3516,11 +3521,11 @@
 		/* Return such an event */
 		pri->ev.e = PRI_EVENT_HANGUP_REQ;
 		pri->ev.hangup.channel = c->channelno | (c->ds1no << 8) | (c->ds1explicit << 16);
+		pri->ev.hangup.cause = c->cause;
 		pri->ev.hangup.cref = c->cr;
-		pri->ev.hangup.cause = c->cause;
 		pri->ev.hangup.call = c;
 		pri->ev.hangup.aoc_units = c->aoc_units;
-                libpri_copy_string(pri->ev.hangup.useruserinfo, c->useruserinfo, sizeof(pri->ev.ring.useruserinfo));
+		libpri_copy_string(pri->ev.hangup.useruserinfo, c->useruserinfo, sizeof(pri->ev.hangup.useruserinfo));
 		c->useruserinfo[0] = '\0';
 		if (c->alive)
 			return Q931_RES_HAVEEVENT;



More information about the svn-commits mailing list