[asterisk-dev] coding with asterisk 11
asterisk-dev-01 at jeremykister.com
Thu Jan 24 00:11:50 CST 2013
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.
More information about the asterisk-dev