[Asterisk-Dev] capabilities bug introduced in chan_iax2.c

Adam Gundy arg at cyberscience.com
Thu Jun 9 12:03:46 MST 2005

a bug in the way IAX2 handles capabilities was introduced by the commit
by kpfleming on June 3rd, changing create_addr() to take a structure
instead of a bunch of arguments.

the problem is that one of the arguments passed in iax2_request() was
'capabilities', which was modified by create_addr() if a matching peer
definition was found... this no longer works, since the new value isn't 
copied out of the structure by iax2_request()

example: set disallow=all in the general section of iax.conf, then
allow=ulaw in an outgoing iax2 peer section. try and make a call. you'll
get a selection of errors about being unable to find a format to use.


Index: channels/chan_iax2.c
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.304
diff -r1.304 chan_iax2.c
<       if (cai.found)
>       if (cai.found) {
>               capability = cai.capability;
>       }

Real Programmers don't comment their code. If it was hard to write,
it should be hard to read, and even harder to modify.
These are all my own opinions.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3182 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20050609/63ec59b4/smime.bin

More information about the asterisk-dev mailing list