[asterisk-dev] Help Understanding Changes to app_queue's call_queue structure
Russell Bryant
russell at digium.com
Sat Jul 2 05:53:22 CDT 2011
----- Original Message -----
> So take my test function:
>
> static int foo_snippet()
> {
> struct call_queue tmpq;
> ast_copy_string(tmpq.name, "MyQueue", sizeof(tmpq.name));
> return 0;
> }
>
> Under 1.6.2.18 it compiles quietly. But under TRUNK I get:
>
> % make all
> app_queue.c: In function 'foo_snippet':
> app_queue.c:XXXX: warning: passing argument 1 of 'ast_copy_string'
> discards qualifiers from pointer target type
Check the stringfields header file here:
http://svnview.digium.com/svn/asterisk/branches/1.8/include/asterisk/stringfields.h?view=markup
The equivalent is:
ast_string_field_set()
However, that would still blow up in your example code (though I know it's just an example). The string fields require some initialization before you can use them, so you can't just declare a queue on the stack like that.
--
Russell Bryant
Digium, Inc. | Engineering Manager, Asterisk
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
www.digium.com -=- www.asterisk.org
More information about the asterisk-dev
mailing list