[asterisk-dev] coding with asterisk 11
Kinsey Moore
kmoore at digium.com
Thu Jan 24 07:53:57 CST 2013
On Thu, Jan 24, 2013 at 12:11 AM, Jeremy Kister <
asterisk-dev-01 at jeremykister.com> wrote:
> in asterisk < 11, the following "worked":
> > ast_copy_string(chan->exten, results, sizeof(chan->exten) - 1);
>
>
> when i update the channel functions for 11:
> > ast_copy_string(ast_channel_**exten(chan), results,
> sizeof(ast_channel_exten(chan)**) - 1);
>
> i get compiler warnings and asterisk core dumps.
> > app_jk.c:585: warning: passing argument 1 of 'ast_copy_string' discards
> qualifiers from pointer target type
> > /usr/include/asterisk/strings.**h:212: note: expected 'char *' but
> argument is of type 'const char *'
>
> can someone tell me the right thing to be doing ?
>
> I think it might have to do with ast_string_field_set (see
> http://lists.digium.com/**pipermail/asterisk-dev/2011-**July/049897.html<http://lists.digium.com/pipermail/asterisk-dev/2011-July/049897.html>)
>
> but I don't understand how to use it.
>
Hi Jeremy,
You'll want to use ast_channel_exten_set(chan, results); since everything
on the channel now uses getters and setters or some other form of
manipulation instead of direct access.
Kinsey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130124/43eb82de/attachment-0001.htm>
More information about the asterisk-dev
mailing list