aboutsummaryrefslogtreecommitdiffstats
path: root/pbx.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-02-01 23:05:28 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-02-01 23:05:28 +0000
commit21d21f89c04ebaad6822311ceadd13275b357513 (patch)
tree86a6664b5cba70b924fdd1cef2ecbf93226e7d58 /pbx.c
parent4d4470fe1560a6d00b17db78798f0cc9790fe74b (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: http://svn.digium.com/svn/asterisk/trunk@9060 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx.c')
-rw-r--r--pbx.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/pbx.c b/pbx.c
index 8c8a270a6..b25079b96 100644
--- a/pbx.c
+++ b/pbx.c
@@ -58,6 +58,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/app.h"
#include "asterisk/devicestate.h"
#include "asterisk/compat.h"
+#include "asterisk/stringfields.h"
/*!
* \note I M P O R T A N T :
@@ -4237,7 +4238,7 @@ int ast_async_goto(struct ast_channel *chan, const char *context, const char *ex
struct ast_channel *tmpchan;
tmpchan = ast_channel_alloc(0);
if (tmpchan) {
- snprintf(tmpchan->name, sizeof(tmpchan->name), "AsyncGoto/%s", chan->name);
+ ast_string_field_build(tmpchan, name, "AsyncGoto/%s", chan->name);
ast_setstate(tmpchan, chan->_state);
/* Make formats okay */
tmpchan->readformat = chan->readformat;
@@ -4736,7 +4737,7 @@ int ast_pbx_outgoing_exten(const char *type, int format, void *data, int timeout
if (ast_exists_extension(chan, context, "failed", 1, NULL)) {
chan = ast_channel_alloc(0);
if (chan) {
- ast_copy_string(chan->name, "OutgoingSpoolFailed", sizeof(chan->name));
+ ast_string_field_set(chan, name, "OutgoingSpoolFailed");
if (!ast_strlen_zero(context))
ast_copy_string(chan->context, context, sizeof(chan->context));
ast_copy_string(chan->exten, "failed", sizeof(chan->exten));
@@ -5344,7 +5345,7 @@ static int pbx_builtin_background(struct ast_channel *chan, void *data)
AST_STANDARD_APP_ARGS(args, parse);
if (!args.lang)
- args.lang = chan->language;
+ args.lang = (char *) chan->language;
if (!args.context)
args.context = chan->context;