[asterisk-commits] rmudgett: branch group/CCSS r237579 - /team/group/CCSS/channels/chan_dahdi.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jan 4 15:59:17 CST 2010


Author: rmudgett
Date: Mon Jan  4 15:59:14 2010
New Revision: 237579

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=237579
Log:
Merged revision 236298 from
https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier

..........
  r236298 | mmichelson | 2009-12-23 10:55:34 -0600 (Wed, 23 Dec 2009) | 5 lines

  Change "dnid" to "address" in places where it makes sense.
  Move comment about stuffing the address into the pvt->dnid to a
  more sensible location.

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

Modified: team/group/CCSS/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/channels/chan_dahdi.c?view=diff&rev=237579&r1=237578&r2=237579
==============================================================================
--- team/group/CCSS/channels/chan_dahdi.c (original)
+++ team/group/CCSS/channels/chan_dahdi.c Mon Jan  4 15:59:14 2010
@@ -8585,7 +8585,7 @@
 	return res;
 }
 #ifdef HAVE_PRI
-static struct ast_str *create_channel_name(struct dahdi_pvt *i, const char * const dnid, struct sig_pri_pri *pri)
+static struct ast_str *create_channel_name(struct dahdi_pvt *i, char *address, struct sig_pri_pri *pri)
 #else
 static struct ast_str *create_channel_name(struct dahdi_pvt *i)
 #endif
@@ -8603,12 +8603,8 @@
 		ast_mutex_lock(&pri->lock);
 		y = ++pri->new_chan_seq;
 		if (i->outgoing) {
-			/*
-			 * The dnid has been stuffed with the called-number[:subaddress]
-			 * by dahdi_request().
-			 */
-			ast_str_set(&chan_name, 0, "i%d/%s-%x", pri->span, dnid, y);
-			i->dnid[0] = '\0';
+			ast_str_set(&chan_name, 0, "i%d/%s-%x", pri->span, address, y);
+			address[0] = '\0';
 		} else if (ast_strlen_zero(i->cid_subaddr)) {
 			/* Put in caller-id number only since there is no subaddress. */
 			ast_str_set(&chan_name, 0, "i%d/%s-%x", pri->span, i->cid_num, y);
@@ -8652,6 +8648,10 @@
 	}
 
 #ifdef HAVE_PRI
+	/*
+	 * The dnid has been stuffed with the called-number[:subaddress]
+	 * by dahdi_request().
+	 */
 	chan_name = create_channel_name(i, i->dnid, i->pri);
 #else
 	chan_name = create_channel_name(i);
@@ -12336,12 +12336,13 @@
 			char dialstring[AST_CHANNEL_NAME];
 			char full_interface_name[AST_CHANNEL_NAME];
 #ifdef HAVE_PRI
-			char dnid[AST_CHANNEL_NAME];
-			sig_pri_extract_called_num_subaddr(p->sig_pvt, dest, dnid, sizeof(dnid));
+			char address[AST_CHANNEL_NAME];
+
+			sig_pri_extract_called_num_subaddr(p->sig_pvt, dest, address, sizeof(address));
 			/* XXX I have no idea how chan_dahdi works and I have no idea where to get the
 			 * proper "pri" argument for create_channel_name in this case
 			 */
-			interface_name = create_channel_name(p, dnid, NULL);
+			interface_name = create_channel_name(p, address, NULL);
 #else
 			interface_name = create_channel_name(p);
 #endif




More information about the asterisk-commits mailing list