aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormartinp <martinp@f38db490-d61c-443f-a65b-d21fe96a405b>2004-01-15 23:38:23 +0000
committermartinp <martinp@f38db490-d61c-443f-a65b-d21fe96a405b>2004-01-15 23:38:23 +0000
commit173af85825ad414085f8eadc641c54d8c36aaf0a (patch)
tree6855f080204a4f2476808d8855ebf4054ce5c9c3 /apps
parentb362c2a04bed1919527ca713abc2a4278afe1de9 (diff)
A little adjustment to the previous one (passing the clid&ani on call_forward)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2044 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-xapps/app_dial.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index f9e6b4282..bfc93f69f 100755
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -203,11 +203,15 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
o->stillgoing = 0;
numbusies++;
} else {
- if (in->callerid && !o->chan->callerid) {
+ if (in->callerid) {
+ if (o->chan->callerid)
+ free(o->chan->callerid);
o->chan->callerid = malloc(strlen(in->callerid) + 1);
strncpy(o->chan->callerid, in->callerid, strlen(in->callerid) + 1);
}
- if (in->ani && !o->chan->ani) {
+ if (in->ani) {
+ if (o->chan->ani)
+ free(o->chan->ani);
o->chan->ani = malloc(strlen(in->ani) + 1);
strncpy(o->chan->ani, in->ani, strlen(in->ani) + 1);
}