Revision: 14740 Author: adrian.chadd Date: Tue Jul 13 07:09:46 2010 Log: Modify the clientdb code to use the new sqinet_get_ipentry() routine.
http://code.google.com/p/lusca-cache/source/detail?r=14740 Modified: /playpen/LUSCA_HEAD_ipv6/src/client_db.c ======================================= --- /playpen/LUSCA_HEAD_ipv6/src/client_db.c Mon Jul 12 06:52:20 2010 +++ /playpen/LUSCA_HEAD_ipv6/src/client_db.c Tue Jul 13 07:09:46 2010 @@ -86,21 +86,13 @@ static void clientdb_Init_Prefix(prefix_t *p, const sqaddr_t *s) { - struct in_addr a4; - struct in6_addr a6; - - switch (sqinet_get_family(s)) { - case AF_INET: - a4 = sqinet_get_v4_inaddr(s, SQADDR_NONE); - Init_Prefix(p, AF_INET, &a4, 32); - break; - case AF_INET6: - a6 = sqinet_get_v6_inaddr(s, SQADDR_NONE); - Init_Prefix(p, AF_INET6, &a6, 128); - break; - default: - fatal("clientdb_Init_Prefix: invalid family?!\n"); - } + void *ptr; + int bitlen; + + bitlen = sqinet_get_bitlength(s); + ptr = sqinet_get_ipentry(s); + + Init_Prefix(p, sqinet_get_family(s), ptr, bitlen); } static radix_node_t * -- 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.
