[asterisk-commits] dhubbard: branch group/issue3450 r131904 - /team/group/issue3450/channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jul 17 18:30:36 CDT 2008


Author: dhubbard
Date: Thu Jul 17 18:30:36 2008
New Revision: 131904

URL: http://svn.digium.com/view/asterisk?view=rev&rev=131904
Log:
Move the PRI_EVENT_SERVICE and PRI_EVENT_SERVICE_ACK event handling blocks to the correct spot.  This corrects the problem
where disabled b-channels continue to receive calls.  Now, a call to a disabled b-channel will be rejected with CONGESTION.
Enabling b-channels will allow subsequent calls to reach the b-channel.


Modified:
    team/group/issue3450/channels/chan_dahdi.c

Modified: team/group/issue3450/channels/chan_dahdi.c
URL: http://svn.digium.com/view/asterisk/team/group/issue3450/channels/chan_dahdi.c?view=diff&rev=131904&r1=131903&r2=131904
==============================================================================
--- team/group/issue3450/channels/chan_dahdi.c (original)
+++ team/group/issue3450/channels/chan_dahdi.c Thu Jul 17 18:30:36 2008
@@ -586,7 +586,7 @@
 	unsigned int progress:1;
 	unsigned int resetting:1;
 	unsigned int setup_ack:1;
-	unsigned int changestatus;	/* for NFAS MAINTenance SERVice message handling */
+	unsigned int changestatus;	/* for NFAS MAINTenance service message handling */
 #endif
 	unsigned int use_smdi:1;		/* Whether to use SMDI on this channel */
 	struct ast_smdi_interface *smdi_iface;	/* The serial port to listen for SMDI data on */
@@ -9964,32 +9964,6 @@
 					ast_mutex_unlock(&p->lock);
 				}
 				break;
-			case PRI_EVENT_SERVICE:
-				chanpos = pri_find_principle(pri, e->service.channel);
-				if (chanpos < 0) {
-					ast_log(LOG_WARNING, "Received SERVice change status %d on unconfigured channel %d/%d span %d\n",
-						e->service_ack.changestatus, PRI_SPAN(e->service_ack.channel), PRI_CHANNEL(e->service_ack.channel), pri->span);
-				} else {
-					ast_mutex_lock(&pri->pvts[chanpos]->lock);
-					pri->pvts[chanpos]->changestatus = e->service.changestatus;
-					ast_mutex_unlock(&pri->pvts[chanpos]->lock);
-					ast_log(LOG_WARNING, "Received SERVice change status %d on channel %d/%d span %d\n",
-						e->service.changestatus, PRI_SPAN(e->service.channel), PRI_CHANNEL(e->service.channel), pri->span);
-				}
-				break;
-			case PRI_EVENT_SERVICE_ACK:
-				chanpos = pri_find_principle(pri, e->service_ack.channel);
-				if (chanpos < 0) {
-					ast_log(LOG_WARNING, "Received SERVice ACKnowledge change status %d on unconfigured channel %d/%d span %d\n",
-						e->service_ack.changestatus, PRI_SPAN(e->service_ack.channel), PRI_CHANNEL(e->service_ack.channel), pri->span);
-				} else {
-					ast_mutex_lock(&pri->pvts[chanpos]->lock);
-					pri->pvts[chanpos]->changestatus = e->service_ack.changestatus;
-					ast_mutex_unlock(&pri->pvts[chanpos]->lock);
-					ast_log(LOG_WARNING, "Received SERVice ACKnowledge change status %d on channel %d/%d span %d\n",
-						e->service_ack.changestatus, PRI_SPAN(e->service_ack.channel), PRI_CHANNEL(e->service_ack.channel), pri->span);
-				}
-				break;
 			default:
 				ast_debug(1, "Unknown event %s\n", ss7_event2str(e->e));
 				break;
@@ -10732,6 +10706,32 @@
 						}
 						ast_mutex_unlock(&pri->pvts[chanpos]->lock);
 					}
+				}
+				break;
+			case PRI_EVENT_SERVICE:
+				chanpos = pri_find_principle(pri, e->service.channel);
+				if (chanpos < 0) {
+					ast_log(LOG_WARNING, "Received service change status %d on unconfigured channel %d/%d span %d\n",
+						e->service_ack.changestatus, PRI_SPAN(e->service_ack.channel), PRI_CHANNEL(e->service_ack.channel), pri->span);
+				} else {
+					ast_mutex_lock(&pri->pvts[chanpos]->lock);
+					pri->pvts[chanpos]->changestatus = e->service.changestatus;
+					ast_mutex_unlock(&pri->pvts[chanpos]->lock);
+					ast_log(LOG_WARNING, "Received service change status %d on channel %d/%d span %d\n",
+						e->service.changestatus, PRI_SPAN(e->service.channel), PRI_CHANNEL(e->service.channel), pri->span);
+				}
+				break;
+			case PRI_EVENT_SERVICE_ACK:
+				chanpos = pri_find_principle(pri, e->service_ack.channel);
+				if (chanpos < 0) {
+					ast_log(LOG_WARNING, "Received service acknowledge change status %d on unconfigured channel %d/%d span %d\n",
+						e->service_ack.changestatus, PRI_SPAN(e->service_ack.channel), PRI_CHANNEL(e->service_ack.channel), pri->span);
+				} else {
+					ast_mutex_lock(&pri->pvts[chanpos]->lock);
+					pri->pvts[chanpos]->changestatus = e->service_ack.changestatus;
+					ast_mutex_unlock(&pri->pvts[chanpos]->lock);
+					ast_log(LOG_WARNING, "Received service acknowledge change status %d on channel %d/%d span %d\n",
+						e->service_ack.changestatus, PRI_SPAN(e->service_ack.channel), PRI_CHANNEL(e->service_ack.channel), pri->span);
 				}
 				break;
 			case PRI_EVENT_RING:




More information about the asterisk-commits mailing list