Revision: 14611 Author: adrian.chadd Date: Sat Apr 17 21:11:04 2010 Log: Issue #94 - .. and make it work.
http://code.google.com/p/lusca-cache/source/detail?r=14611 Modified: /branches/LUSCA_HEAD/libcore/radix.c ======================================= --- /branches/LUSCA_HEAD/libcore/radix.c Sat Apr 17 21:02:56 2010 +++ /branches/LUSCA_HEAD/libcore/radix.c Sat Apr 17 21:11:04 2010 @@ -700,18 +700,22 @@ if (prefix->family == AF_INET) { bzero(&sin, sizeof(sin)); + sin.sin_family = AF_INET; + /* sin.sin_len = sizeof(sin); */ memcpy(&sin.sin_addr, &prefix->add.sin, sizeof(sin.sin_addr)); s = (struct sockaddr *) &sin; sl = sizeof(sin); } else if (prefix->family == AF_INET6) { bzero(&sin6, sizeof(sin6)); + sin6.sin6_family = AF_INET6; + /* sin6.sin6_len = sizeof(sin6); */ memcpy(&sin6.sin6_addr, &prefix->add.sin6, sizeof(sin6.sin6_addr)); s = (struct sockaddr *) &sin6; sl = sizeof(sin6); } else return NULL; - if (getnameinfo(s, sl, NULL, 0, buf, len, NI_NUMERICHOST) == 0) + if (getnameinfo(s, sl, buf, len, NULL, 0, NI_NUMERICHOST) == 0) return buf; return NULL; -- You received this message because you are subscribed to the Google Groups "lusca-commit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/lusca-commit?hl=en.
