Merge remote branch 'kev009/master'

This commit is contained in:
Nick Mathewson 2010-11-22 20:24:03 -05:00
commit 150d7d0a49

View File

@ -206,7 +206,7 @@ regress_ipv6_parse(void *ptr)
static struct sa_port_ent {
const char *parse;
int sa_family;
int safamily;
const char *addr;
int port;
} sa_port_ents[] = {
@ -235,14 +235,14 @@ regress_sockaddr_port_parse(void *ptr)
memset(&ss, 0, sizeof(ss));
r = evutil_parse_sockaddr_port(ent->parse, (struct sockaddr*)&ss, &len);
if (r < 0) {
if (ent->sa_family)
if (ent->safamily)
TT_FAIL(("Couldn't parse %s!", ent->parse));
continue;
} else if (! ent->sa_family) {
} else if (! ent->safamily) {
TT_FAIL(("Shouldn't have been able to parse %s!", ent->parse));
continue;
}
if (ent->sa_family == AF_INET) {
if (ent->safamily == AF_INET) {
struct sockaddr_in sin;
memset(&sin, 0, sizeof(sin));
#ifdef _EVENT_HAVE_STRUCT_SOCKADDR_IN_SIN_LEN