diff options
author | Kevin P. Fleming <kpfleming@digium.com> | 2006-02-01 23:05:28 +0000 |
---|---|---|
committer | Kevin P. Fleming <kpfleming@digium.com> | 2006-02-01 23:05:28 +0000 |
commit | a16ae226b685a8c434ec4f7eecf4ee8864fde4c7 (patch) | |
tree | 86a6664b5cba70b924fdd1cef2ecbf93226e7d58 /apps/app_dial.c | |
parent | f246b9fc64ea8843f419947045574edb2681f9a2 (diff) |
use string fields for some stuff in ast_channel
const-ify some more APIs
remove 'type' field from ast_channel, in favor of the one in the channel's tech structure
allow string field module users to specify the 'chunk size' for pool allocations
update chan_alsa to be compatible with recent const-ification patches
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r-- | apps/app_dial.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c index 346cf4eaa..cfe25b81b 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -58,6 +58,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/rtp.h" #include "asterisk/manager.h" #include "asterisk/privacy.h" +#include "asterisk/stringfields.h" static char *tdesc = "Dialing Application"; @@ -498,7 +499,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_l else newcid = in->exten; o->chan->cid.cid_num = strdup(newcid); - ast_copy_string(o->chan->accountcode, winner->accountcode, sizeof(o->chan->accountcode)); + ast_string_field_set(o->chan, accountcode, winner->accountcode); o->chan->cdrflags = winner->cdrflags; if (!o->chan->cid.cid_num) ast_log(LOG_WARNING, "Out of memory\n"); @@ -513,7 +514,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_l if (!o->chan->cid.cid_name) ast_log(LOG_WARNING, "Out of memory\n"); } - ast_copy_string(o->chan->accountcode, in->accountcode, sizeof(o->chan->accountcode)); + ast_string_field_set(o->chan, accountcode, in->accountcode); o->chan->cdrflags = in->cdrflags; } @@ -1089,11 +1090,11 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags tmp->chan->cid.cid_ani = strdup(chan->cid.cid_ani); /* Copy language from incoming to outgoing */ - ast_copy_string(tmp->chan->language, chan->language, sizeof(tmp->chan->language)); - ast_copy_string(tmp->chan->accountcode, chan->accountcode, sizeof(tmp->chan->accountcode)); + ast_string_field_set(tmp->chan, language, chan->language); + ast_string_field_set(tmp->chan, accountcode, chan->accountcode); tmp->chan->cdrflags = chan->cdrflags; if (ast_strlen_zero(tmp->chan->musicclass)) - ast_copy_string(tmp->chan->musicclass, chan->musicclass, sizeof(tmp->chan->musicclass)); + ast_string_field_set(tmp->chan, musicclass, chan->musicclass); if (chan->cid.cid_rdnis) tmp->chan->cid.cid_rdnis = strdup(chan->cid.cid_rdnis); /* Pass callingpres setting */ |