[asterisk-dev] coding with asterisk 11
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
> but I don't understand how to use it.
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the asterisk-dev