[svn-commits] rmudgett: branch group/issue8824 r141160 - in /team/group/issue8824: apps/ ch...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Sep 5 09:59:24 CDT 2008
Author: rmudgett
Date: Fri Sep 5 09:59:23 2008
New Revision: 141160
URL: http://svn.digium.com/view/asterisk?view=rev&rev=141160
Log:
Removed unneeded elements in struct ast_connectedline
Modified:
team/group/issue8824/apps/app_dial.c
team/group/issue8824/apps/app_queue.c
team/group/issue8824/channels/chan_dahdi.c
team/group/issue8824/channels/chan_h323.c
team/group/issue8824/channels/chan_iax2.c
team/group/issue8824/channels/chan_local.c
team/group/issue8824/include/asterisk/channel.h
team/group/issue8824/main/channel.c
team/group/issue8824/main/dial.c
Modified: team/group/issue8824/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/group/issue8824/apps/app_dial.c?view=diff&rev=141160&r1=141159&r2=141160
==============================================================================
--- team/group/issue8824/apps/app_dial.c (original)
+++ team/group/issue8824/apps/app_dial.c Fri Sep 5 09:59:23 2008
@@ -1515,11 +1515,11 @@
S_REPLACE(tc->lid.lid_num, ast_strdup(chan->cid.cid_num));
S_REPLACE(tc->lid.lid_name, ast_strdup(chan->cid.cid_name));
S_REPLACE(tc->lid.lid_ani, ast_strdup(chan->cid.cid_ani));
- S_REPLACE(tc->lid.lid_rdnis, ast_strdup(chan->cid.cid_rdnis));
+ S_REPLACE(tc->cid.cid_rdnis, ast_strdup(chan->cid.cid_rdnis));
tc->lid.lid_pres = chan->cid.cid_pres;
tc->lid.lid_ton = chan->cid.cid_ton;
- tc->lid.lid_tns = chan->cid.cid_tns;
+ tc->cid.cid_tns = chan->cid.cid_tns;
tc->lid.lid_ani2 = chan->cid.cid_ani2;
}
Modified: team/group/issue8824/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/group/issue8824/apps/app_queue.c?view=diff&rev=141160&r1=141159&r2=141160
==============================================================================
--- team/group/issue8824/apps/app_queue.c (original)
+++ team/group/issue8824/apps/app_queue.c Fri Sep 5 09:59:23 2008
@@ -2224,13 +2224,13 @@
if (tmp->chan->lid.lid_ani)
ast_free(tmp->chan->lid.lid_ani);
tmp->chan->lid.lid_ani = ast_strdup(qe->chan->cid.cid_ani);
- if (tmp->chan->lid.lid_rdnis)
- ast_free(tmp->chan->lid.lid_rdnis);
- tmp->chan->lid.lid_rdnis = ast_strdup(qe->chan->cid.cid_rdnis);
+ if (tmp->chan->cid.cid_rdnis)
+ ast_free(tmp->chan->cid.cid_rdnis);
+ tmp->chan->cid.cid_rdnis = ast_strdup(qe->chan->cid.cid_rdnis);
tmp->chan->lid.lid_pres = qe->chan->cid.cid_pres;
tmp->chan->lid.lid_ton = qe->chan->cid.cid_ton;
- tmp->chan->lid.lid_tns = qe->chan->cid.cid_tns;
+ tmp->chan->cid.cid_tns = qe->chan->cid.cid_tns;
tmp->chan->lid.lid_ani2 = qe->chan->cid.cid_ani2;
/* Inherit specially named variables from parent channel */
Modified: team/group/issue8824/channels/chan_dahdi.c
URL: http://svn.digium.com/view/asterisk/team/group/issue8824/channels/chan_dahdi.c?view=diff&rev=141160&r1=141159&r2=141160
==============================================================================
--- team/group/issue8824/channels/chan_dahdi.c (original)
+++ team/group/issue8824/channels/chan_dahdi.c Fri Sep 5 09:59:23 2008
@@ -2775,7 +2775,7 @@
redirect_reason = PRI_REDIR_UNCONDITIONAL;
} else
redirect_reason = PRI_REDIR_UNCONDITIONAL;
- pri_sr_set_redirecting(sr, ast->lid.lid_rdnis, p->pri->localdialplan - 1, PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN, redirect_reason);
+ pri_sr_set_redirecting(sr, ast->cid.cid_rdnis, p->pri->localdialplan - 1, PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN, redirect_reason);
#ifdef SUPPORT_USERUSER
/* User-user info */
Modified: team/group/issue8824/channels/chan_h323.c
URL: http://svn.digium.com/view/asterisk/team/group/issue8824/channels/chan_h323.c?view=diff&rev=141160&r1=141159&r2=141160
==============================================================================
--- team/group/issue8824/channels/chan_h323.c (original)
+++ team/group/issue8824/channels/chan_h323.c Fri Sep 5 09:59:23 2008
@@ -612,8 +612,8 @@
if (c->lid.lid_name)
ast_copy_string(pvt->options.cid_name, c->lid.lid_name, sizeof(pvt->options.cid_name));
- if (c->lid.lid_rdnis) {
- ast_copy_string(pvt->options.cid_rdnis, c->lid.lid_rdnis, sizeof(pvt->options.cid_rdnis));
+ if (c->cid.cid_rdnis) {
+ ast_copy_string(pvt->options.cid_rdnis, c->cid.cid_rdnis, sizeof(pvt->options.cid_rdnis));
}
pvt->options.presentation = c->lid.lid_pres;
Modified: team/group/issue8824/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/group/issue8824/channels/chan_iax2.c?view=diff&rev=141160&r1=141159&r2=141160
==============================================================================
--- team/group/issue8824/channels/chan_iax2.c (original)
+++ team/group/issue8824/channels/chan_iax2.c Fri Sep 5 09:59:23 2008
@@ -3666,7 +3666,7 @@
}
iax_ie_append_byte(&ied, IAX_IE_CALLINGTON, c->lid.lid_ton);
- iax_ie_append_short(&ied, IAX_IE_CALLINGTNS, c->lid.lid_tns);
+ iax_ie_append_short(&ied, IAX_IE_CALLINGTNS, c->cid.cid_tns);
if (n)
iax_ie_append_str(&ied, IAX_IE_CALLING_NAME, n);
@@ -3676,9 +3676,9 @@
if (!ast_strlen_zero(c->language))
iax_ie_append_str(&ied, IAX_IE_LANGUAGE, c->language);
if (!ast_strlen_zero(c->cid.cid_dnid))
- iax_ie_append_str(&ied, IAX_IE_DNID, c->lid.lid_dnid);
+ iax_ie_append_str(&ied, IAX_IE_DNID, c->cid.cid_dnid);
if (!ast_strlen_zero(c->cid.cid_rdnis))
- iax_ie_append_str(&ied, IAX_IE_RDNIS, c->lid.lid_rdnis);
+ iax_ie_append_str(&ied, IAX_IE_RDNIS, c->cid.cid_rdnis);
if (pds.context)
iax_ie_append_str(&ied, IAX_IE_CALLED_CONTEXT, pds.context);
Modified: team/group/issue8824/channels/chan_local.c
URL: http://svn.digium.com/view/asterisk/team/group/issue8824/channels/chan_local.c?view=diff&rev=141160&r1=141159&r2=141160
==============================================================================
--- team/group/issue8824/channels/chan_local.c (original)
+++ team/group/issue8824/channels/chan_local.c Fri Sep 5 09:59:23 2008
@@ -504,11 +504,11 @@
p->chan->cid.cid_num = ast_strdup(p->owner->lid.lid_num);
p->chan->cid.cid_name = ast_strdup(p->owner->lid.lid_name);
p->chan->cid.cid_ani = ast_strdup(p->owner->lid.lid_ani);
- p->chan->cid.cid_rdnis = ast_strdup(p->owner->lid.lid_rdnis);
+ p->chan->cid.cid_rdnis = ast_strdup(p->owner->cid.cid_rdnis);
p->chan->cid.cid_pres = p->owner->lid.lid_pres;
p->chan->cid.cid_ton = p->owner->lid.lid_ton;
- p->chan->cid.cid_tns = p->owner->lid.lid_tns;
+ p->chan->cid.cid_tns = p->owner->cid.cid_tns;
p->chan->cid.cid_ani2 = p->owner->lid.lid_ani2;
ast_set_connectedline(p->chan, p->owner->cid.cid_num, p->owner->cid.cid_name, p->owner->cid.cid_pres);
Modified: team/group/issue8824/include/asterisk/channel.h
URL: http://svn.digium.com/view/asterisk/team/group/issue8824/include/asterisk/channel.h?view=diff&rev=141160&r1=141159&r2=141160
==============================================================================
--- team/group/issue8824/include/asterisk/channel.h (original)
+++ team/group/issue8824/include/asterisk/channel.h Fri Sep 5 09:59:23 2008
@@ -220,15 +220,12 @@
* Also, NULL and "" must be considered equivalent.
*/
struct ast_connectedline {
- char *lid_dnid; /*!< Malloc'd Dialed Number Identifier */
char *lid_num; /*!< Malloc'd Line Number */
char *lid_name; /*!< Malloc'd Line Name */
char *lid_ani; /*!< Malloc'd ANI */
- char *lid_rdnis; /*!< Malloc'd RDNIS */
int lid_pres; /*!< Line presentation/screening */
int lid_ani2; /*!< Line ANI 2 (Info digits) */
int lid_ton; /*!< Line Type of Number */
- int lid_tns; /*!< Line Transit Network Select */
};
/*! \brief
Modified: team/group/issue8824/main/channel.c
URL: http://svn.digium.com/view/asterisk/team/group/issue8824/main/channel.c?view=diff&rev=141160&r1=141159&r2=141160
==============================================================================
--- team/group/issue8824/main/channel.c (original)
+++ team/group/issue8824/main/channel.c Fri Sep 5 09:59:23 2008
@@ -1271,17 +1271,13 @@
static void free_lid(struct ast_connectedline *lid)
{
- if (lid->lid_dnid)
- ast_free(lid->lid_dnid);
if (lid->lid_num)
ast_free(lid->lid_num);
if (lid->lid_name)
ast_free(lid->lid_name);
if (lid->lid_ani)
ast_free(lid->lid_ani);
- if (lid->lid_rdnis)
- ast_free(lid->lid_rdnis);
- lid->lid_dnid = lid->lid_num = lid->lid_name = lid->lid_ani = lid->lid_rdnis = NULL;
+ lid->lid_num = lid->lid_name = lid->lid_ani = NULL;
}
/*! \brief Free a channel structure */
@@ -5213,8 +5209,6 @@
{
int numlen, namelen, pos = 0;
- lid_pres = htonl(lid_pres);
-
if (lid_num && (numlen = strlen(lid_num)) > 0) {
if (pos + (sizeof(data[0]) * 2) + numlen > datalen) {
ast_log(LOG_WARNING, "No space left for connected line number\n");
@@ -5243,6 +5237,7 @@
}
data[pos++] = AST_CONNECTEDLINE_PRESENTATION;
data[pos++] = sizeof(lid_pres);
+ lid_pres = htonl(lid_pres);
memcpy(data + pos, &lid_pres, sizeof(lid_pres));
pos += sizeof(lid_pres);
Modified: team/group/issue8824/main/dial.c
URL: http://svn.digium.com/view/asterisk/team/group/issue8824/main/dial.c?view=diff&rev=141160&r1=141159&r2=141160
==============================================================================
--- team/group/issue8824/main/dial.c (original)
+++ team/group/issue8824/main/dial.c Fri Sep 5 09:59:23 2008
@@ -276,7 +276,7 @@
S_REPLACE(channel->owner->lid.lid_num, ast_strdup(chan->cid.cid_num));
S_REPLACE(channel->owner->lid.lid_name, ast_strdup(chan->cid.cid_name));
S_REPLACE(channel->owner->lid.lid_ani, ast_strdup(chan->cid.cid_ani));
- S_REPLACE(channel->owner->lid.lid_rdnis, ast_strdup(chan->cid.cid_rdnis));
+ S_REPLACE(channel->owner->cid.cid_rdnis, ast_strdup(chan->cid.cid_rdnis));
ast_string_field_set(channel->owner, language, chan->language);
ast_string_field_set(channel->owner, accountcode, chan->accountcode);
@@ -286,7 +286,7 @@
channel->owner->lid.lid_pres = chan->cid.cid_pres;
channel->owner->lid.lid_ton = chan->cid.cid_ton;
- channel->owner->lid.lid_tns = chan->cid.cid_tns;
+ channel->owner->cid.cid_tns = chan->cid.cid_tns;
channel->owner->lid.lid_ani2 = chan->cid.cid_ani2;
channel->owner->adsicpe = chan->adsicpe;
channel->owner->transfercapability = chan->transfercapability;
More information about the svn-commits
mailing list