[asterisk-dev] [Bamboo] Paul Belanger commented on Asterisk - Trunk - FreeBSD 8.1 272

Walter Doekes walter+asterisk-dev at osso.nl
Thu Jul 7 05:33:24 CDT 2011


On 06/07/11 14:26, Paul Belanger wrote:
> Comments <http://bamboo.asterisk.org/browse/ASTTRUNK-FREEBSD81-272>
>
> 	Paul Belanger <http://bamboo.asterisk.org/browse/user/pabelanger> (06
> Jul 2011, 7:26:33 AM)
> Looks like the we need to look at the new fax code and netsock2 parsing
> under FreeBSD

> [test_netsock2.c:parsing:104]: Re-parsed stringification did not match: '' vs '(null)'
> [test_netsock2.c:parsing:94]: On '[fe80::200:5aee:feaa:20a2%eth0]' expected 1 but got 0

Those tests (trunk, r326635) could use some tweaks:


(1) ast_test_status_update(test, "Re-parsed stringification did not 
match: '%s' vs '%s'\n", ast_sockaddr_stringify(&addr), 
ast_sockaddr_stringify(&tmp_addr));
[./tests/test_netsock2.c:104]

That would probably better look like the following, lest 
ast_sockaddr_stringify overwrite its own thread-local static buffer.

char buf[BUFSIZ];
strcpy(buf, tmp);
ast_test_status_update(test, "Re-parsed stringification did not match: 
'%s' vs '%s'\n", buf, ast_sockaddr_stringify(&tmp_addr));


(2) You'll probably want to know on which address the stringification 
failed:

ast_test_status_update(test, "Re-parsed stringification of %s did not 
match: '%s' vs '%s'\n", test_vals[x].address, buf, 
ast_sockaddr_stringify(&tmp_addr));



As for parse error of [fe80::200:5aee:feaa:20a2%eth0]:

Could it be that it fails because eth0 is ne0 on bsd?


Regards,
Walter



More information about the asterisk-dev mailing list