[asterisk-dev] ast_sockaddr_stringify

Simon Perreault simon.perreault at viagenie.ca
Fri Feb 24 09:40:37 CST 2012


On 2012-02-24 10:35, Johann Steinwendtner wrote:
> Yes, but than the usage is incorrect. (null) is not an ip address to me.
> in my system: sip show peer <peername> prints:
> Defaddr->IP : (null)
>
> Howwever, iax2 show peer <peername> prints:
> Defaddr->IP : 0.0.0.0 Port 0

It is important that the stringification of NULL not equal the 
strigification of a valid sockaddr.

It could be "" or "(null)" or "patate", it doesn't matter, as long as 
it's not a valid sockaddr.

I, for one, prefer "(null)" to "" because my brain finds it easier to 
understand what's going on.

Simon
-- 
DTN made easy, lean, and smart --> http://postellation.viagenie.ca
NAT64/DNS64 open-source        --> http://ecdysis.viagenie.ca
STUN/TURN server               --> http://numb.viagenie.ca



More information about the asterisk-dev mailing list