[svn-commits] rmudgett: branch rmudgett/cid r263635 - in /team/rmudgett/cid: channels/ func...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon May 17 16:06:56 CDT 2010


Author: rmudgett
Date: Mon May 17 16:06:52 2010
New Revision: 263635

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=263635
Log:
Move ast_channel.cid.dialed_subaddress to ast_channel.dialed.subaddress.

Modified:
    team/rmudgett/cid/channels/chan_local.c
    team/rmudgett/cid/channels/sig_pri.c
    team/rmudgett/cid/funcs/func_callerid.c
    team/rmudgett/cid/include/asterisk/channel.h
    team/rmudgett/cid/main/cdr.c
    team/rmudgett/cid/main/channel.c

Modified: team/rmudgett/cid/channels/chan_local.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/cid/channels/chan_local.c?view=diff&rev=263635&r1=263634&r2=263635
==============================================================================
--- team/rmudgett/cid/channels/chan_local.c (original)
+++ team/rmudgett/cid/channels/chan_local.c Mon May 17 16:06:52 2010
@@ -581,15 +581,7 @@
 	 */
 	ast_party_redirecting_copy(&p->chan->redirecting, &p->owner->redirecting);
 
-	ast_free(p->chan->cid.cid_dnid);
-	p->chan->cid.cid_dnid = ast_strdup(p->owner->cid.cid_dnid);
-	if (!p->chan->cid.cid_dnid && p->owner->cid.cid_dnid) {
-		/* Allocation failure */
-		ast_mutex_unlock(&p->lock);
-		ast_channel_unlock(p->chan);
-		return -1;
-	}
-	p->chan->cid.cid_tns = p->owner->cid.cid_tns;
+	ast_party_dialed_copy(&p->chan->dialed, &p->owner->dialed);
 
 	ast_connected_line_copy_to_caller(&p->chan->cid, &p->owner->connected);
 	ast_connected_line_copy_from_caller(&p->chan->connected, &p->owner->cid);

Modified: team/rmudgett/cid/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/cid/channels/sig_pri.c?view=diff&rev=263635&r1=263634&r2=263635
==============================================================================
--- team/rmudgett/cid/channels/sig_pri.c (original)
+++ team/rmudgett/cid/channels/sig_pri.c Mon May 17 16:06:52 2010
@@ -3245,7 +3245,7 @@
 									/* Set Called Subaddress */
 									sig_pri_lock_owner(pri, chanpos);
 									sig_pri_set_subaddress(
-										&pri->pvts[chanpos]->owner->cid.dialed_subaddress,
+										&pri->pvts[chanpos]->owner->dialed.subaddress,
 										&e->ring.called_subaddress);
 									if (!e->ring.called_subaddress.type
 										&& !ast_strlen_zero(
@@ -3346,7 +3346,7 @@
 									/* Set Called Subaddress */
 									sig_pri_lock_owner(pri, chanpos);
 									sig_pri_set_subaddress(
-										&pri->pvts[chanpos]->owner->cid.dialed_subaddress,
+										&pri->pvts[chanpos]->owner->dialed.subaddress,
 										&e->ring.called_subaddress);
 									if (!e->ring.called_subaddress.type
 										&& !ast_strlen_zero(

Modified: team/rmudgett/cid/funcs/func_callerid.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/cid/funcs/func_callerid.c?view=diff&rev=263635&r1=263634&r2=263635
==============================================================================
--- team/rmudgett/cid/funcs/func_callerid.c (original)
+++ team/rmudgett/cid/funcs/func_callerid.c Mon May 17 16:06:52 2010
@@ -183,14 +183,14 @@
 			/* also matches dnid-subaddr-valid, dnid-subaddr-type, dnid-subaddr-odd, dnid-subaddr */
 			if (!strncasecmp(data + 4 ,"-subaddr", 8)) {
 				if (!strncasecmp(data + 12 ,"-valid", 6)) {		/* dnid-subaddr-valid */
-					snprintf(buf, len, "%d", chan->cid.dialed_subaddress.valid);
+					snprintf(buf, len, "%d", chan->dialed.subaddress.valid);
 				} else if (!strncasecmp(data + 12 ,"-type", 5)) {	/* dnid-subaddr-type */
-					snprintf(buf, len, "%d", chan->cid.dialed_subaddress.type);
+					snprintf(buf, len, "%d", chan->dialed.subaddress.type);
 				} else if (!strncasecmp(data + 12 ,"-odd", 4)) {	/* dnid-subaddr-odd */
-					snprintf(buf, len, "%d", chan->cid.dialed_subaddress.odd_even_indicator);
+					snprintf(buf, len, "%d", chan->dialed.subaddress.odd_even_indicator);
 				} else {						/* dnid-subaddr */
-					if (chan->cid.dialed_subaddress.str) {
-						ast_copy_string(buf, chan->cid.dialed_subaddress.str, len);
+					if (chan->dialed.subaddress.str) {
+						ast_copy_string(buf, chan->dialed.subaddress.str, len);
 					}
 				}
 			} else {							/* dnid */
@@ -280,16 +280,16 @@
 		/* also matches dnid-subaddr-valid, dnid-subaddr-type, dnid-subaddr-odd, dnid-subaddr */
 		if (!strncasecmp(data + 4 ,"-subaddr", 8)) {
 			if (!strncasecmp(data + 12 ,"-valid", 6)) {		/* dnid-subaddr-valid */
-				chan->cid.dialed_subaddress.valid = atoi(value) ? 1 : 0;
+				chan->dialed.subaddress.valid = atoi(value) ? 1 : 0;
 			} else if (!strncasecmp(data + 12 ,"-type", 5)) {	/* dnid-subaddr-type */
-				chan->cid.dialed_subaddress.type = atoi(value) ? 2 : 0;
+				chan->dialed.subaddress.type = atoi(value) ? 2 : 0;
 			} else if (!strncasecmp(data + 12 ,"-odd", 4)) {	/* dnid-subaddr-odd */
-				chan->cid.dialed_subaddress.odd_even_indicator = atoi(value) ? 1 : 0;
+				chan->dialed.subaddress.odd_even_indicator = atoi(value) ? 1 : 0;
 			} else {						/* dnid-subaddr */
-				if (chan->cid.dialed_subaddress.str) {
-					ast_free(chan->cid.dialed_subaddress.str);
+				if (chan->dialed.subaddress.str) {
+					ast_free(chan->dialed.subaddress.str);
 				}
-				chan->cid.dialed_subaddress.str = ast_strdup(value);
+				chan->dialed.subaddress.str = ast_strdup(value);
 			}
 		} else {							/* dnid */
 			if (chan->cid.cid_dnid) {

Modified: team/rmudgett/cid/include/asterisk/channel.h
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/cid/include/asterisk/channel.h?view=diff&rev=263635&r1=263634&r2=263635
==============================================================================
--- team/rmudgett/cid/include/asterisk/channel.h (original)
+++ team/rmudgett/cid/include/asterisk/channel.h Mon May 17 16:06:52 2010
@@ -364,11 +364,6 @@
 	 * (Field will eventually move to struct ast_channel.caller.id.subaddress)
 	 */
 	struct ast_party_subaddress subaddress;
-	/*!
-	 * \brief Dialed/Called subaddress.
-	 * (Field will eventually move to struct ast_channel.dialed.subaddress)
-	 */
-	struct ast_party_subaddress dialed_subaddress;
 };
 
 /*!

Modified: team/rmudgett/cid/main/cdr.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/cid/main/cdr.c?view=diff&rev=263635&r1=263634&r2=263635
==============================================================================
--- team/rmudgett/cid/main/cdr.c (original)
+++ team/rmudgett/cid/main/cdr.c Mon May 17 16:06:52 2010
@@ -865,8 +865,8 @@
 	if (c->cid.subaddress.valid) {
 		ast_cdr_setvar(cdr, "callingsubaddr", S_OR(c->cid.subaddress.str, ""), 0);
 	}
-	if (c->cid.dialed_subaddress.valid) {
-		ast_cdr_setvar(cdr, "calledsubaddr", S_OR(c->cid.dialed_subaddress.str, ""), 0);
+	if (c->dialed.subaddress.valid) {
+		ast_cdr_setvar(cdr, "calledsubaddr", S_OR(c->dialed.subaddress.str, ""), 0);
 	}
 }
 

Modified: team/rmudgett/cid/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/cid/main/channel.c?view=diff&rev=263635&r1=263634&r2=263635
==============================================================================
--- team/rmudgett/cid/main/channel.c (original)
+++ team/rmudgett/cid/main/channel.c Mon May 17 16:06:52 2010
@@ -1534,7 +1534,6 @@
 	ast_free(cid->cid_tag);
 	cid->cid_dnid = cid->cid_num = cid->cid_name = cid->cid_ani = NULL;
 	ast_party_subaddress_free(&cid->subaddress);
-	ast_party_subaddress_free(&cid->dialed_subaddress);
 }
 
 struct ast_channel *ast_channel_release(struct ast_channel *chan)




More information about the svn-commits mailing list