cachedump.c (249141) | cachedump.c (255579) |
---|---|
1/* 2 * daemon/cachedump.c - dump the cache to text format. 3 * 4 * Copyright (c) 2008, NLnet Labs. All rights reserved. 5 * 6 * This software is open source. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 285 unchanged lines hidden (view full) --- 294{ 295 struct reply_info* rep = (struct reply_info*)e->data; 296 *d = (struct reply_info*)regional_alloc_init(region, e->data, 297 sizeof(struct reply_info) + 298 sizeof(struct rrset_ref) * (rep->rrset_count-1) + 299 sizeof(struct ub_packed_rrset_key*) * rep->rrset_count); 300 if(!*d) 301 return 0; | 1/* 2 * daemon/cachedump.c - dump the cache to text format. 3 * 4 * Copyright (c) 2008, NLnet Labs. All rights reserved. 5 * 6 * This software is open source. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 285 unchanged lines hidden (view full) --- 294{ 295 struct reply_info* rep = (struct reply_info*)e->data; 296 *d = (struct reply_info*)regional_alloc_init(region, e->data, 297 sizeof(struct reply_info) + 298 sizeof(struct rrset_ref) * (rep->rrset_count-1) + 299 sizeof(struct ub_packed_rrset_key*) * rep->rrset_count); 300 if(!*d) 301 return 0; |
302 (*d)->rrsets = (struct ub_packed_rrset_key**)( | 302 (*d)->rrsets = (struct ub_packed_rrset_key**)(void *)( |
303 (uint8_t*)(&((*d)->ref[0])) + 304 sizeof(struct rrset_ref) * rep->rrset_count); 305 *k = (struct query_info*)regional_alloc_init(region, 306 e->key, sizeof(struct query_info)); 307 if(!*k) 308 return 0; 309 (*k)->qname = regional_alloc_init(region, 310 (*k)->qname, (*k)->qname_len); --- 674 unchanged lines hidden --- | 303 (uint8_t*)(&((*d)->ref[0])) + 304 sizeof(struct rrset_ref) * rep->rrset_count); 305 *k = (struct query_info*)regional_alloc_init(region, 306 e->key, sizeof(struct query_info)); 307 if(!*k) 308 return 0; 309 (*k)->qname = regional_alloc_init(region, 310 (*k)->qname, (*k)->qname_len); --- 674 unchanged lines hidden --- |