Menu

#78 stun_handle_init() fails

open
nobody
5
2007-07-31
2007-07-31
stefan_l
No

Problem:
stun_handle_init() fails after upgrade from Sofia SIP V1.12.1 to V1.12.6.

Example:
stun_handle_t* pStun = stun_handle_init(pRoot,
STUNTAG_SERVER("stun.sipgate.net:10000"),
STUNTAG_DOMAIN("sipgate.de"), TAG_NULL());

Environment:
uClibc-0.9.27 on a MIPS4kEC platform.
getaddrinfo() from uClibc:
(config.h:#define HAVE_GETADDRINFO 1)

Debug:
stun_handle_init() calls
stun_atoaddr() calls
su_getaddrinfo calls
getaddrinfo() returns -8

The problem seems to be the change on lines 893,894 in su_addrinfo.c::su_getaddrinfo():

if (!service || service[0] == '\0')
service = "0";

stun_atoaddr() sets service to NULL (OK according to the manpage as long as node != NULL).

If I remove the two lines, everything works fine.

Discussion


Log in to post a comment.