From a16ae226b685a8c434ec4f7eecf4ee8864fde4c7 Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Wed, 1 Feb 2006 23:05:28 +0000 Subject: 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 --- res/res_features.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'res/res_features.c') diff --git a/res/res_features.c b/res/res_features.c index c705b2310..d39212131 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -174,7 +174,7 @@ static void check_goto_on_transfer(struct ast_channel *chan) for (x = goto_on_transfer; x && *x; x++) if (*x == '^') *x = '|'; - strcpy(xferchan->name, chan->name); + ast_string_field_set(xferchan, name, chan->name); /* Make formats okay */ xferchan->readformat = chan->readformat; xferchan->writeformat = chan->writeformat; @@ -201,9 +201,9 @@ static void *ast_bridge_call_thread(void *data) struct ast_bridge_thread_obj *tobj = data; tobj->chan->appl = "Transferred Call"; - tobj->chan->data = tobj->peer->name; + tobj->chan->data = (char *) tobj->peer->name; tobj->peer->appl = "Transferred Call"; - tobj->peer->data = tobj->chan->name; + tobj->peer->data = (char *) tobj->chan->name; if (tobj->chan->cdr) { ast_cdr_reset(tobj->chan->cdr, NULL); ast_cdr_setdestchan(tobj->chan->cdr, tobj->peer->name); @@ -385,7 +385,7 @@ int ast_masq_park_call(struct ast_channel *rchan, struct ast_channel *peer, int /* Make a new, fake channel that we'll use to masquerade in the real one */ if ((chan = ast_channel_alloc(0))) { /* Let us keep track of the channel name */ - snprintf(chan->name, sizeof (chan->name), "Parked/%s",rchan->name); + ast_string_field_build(chan, name, "Parked/%s",rchan->name); /* Make formats okay */ chan->readformat = rchan->readformat; @@ -758,7 +758,7 @@ static int builtin_atxfer(struct ast_channel *chan, struct ast_channel *peer, st } if ((xferchan = ast_channel_alloc(0))) { - snprintf(xferchan->name, sizeof (xferchan->name), "Transfered/%s",transferee->name); + ast_string_field_build(xferchan, name, "Transfered/%s", transferee->name); /* Make formats okay */ xferchan->readformat = transferee->readformat; xferchan->writeformat = transferee->writeformat; @@ -1280,7 +1280,7 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast if (ast_answer(chan)) return -1; peer->appl = "Bridged Call"; - peer->data = chan->name; + peer->data = (char *) chan->name; /* copy the userfield from the B-leg to A-leg if applicable */ if (chan->cdr && peer->cdr && !ast_strlen_zero(peer->cdr->userfield)) { -- cgit v1.2.3