- Timestamp:
- Mar 2, 2007 2:51:03 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/pjproject-0.5-stable/pjlib-util/src/pjlib-util/resolver.c
r974 r1033 52 52 #define RES_BUF_SZ PJ_DNS_RESOLVER_RES_BUF_SIZE 53 53 #define UDPSZ PJ_DNS_RESOLVER_MAX_UDP_SIZE 54 #define TMP_SZ PJ_DNS_RESOLVER_TMP_BUF_SIZE 54 55 55 56 … … 162 163 pj_bool_t own_ioqueue; /**< Do we own ioqueue? */ 163 164 pj_ioqueue_t *ioqueue; /**< Ioqueue instance. */ 164 char tmp_pool[ 1500];/**< Temporary pool buffer. */165 char tmp_pool[TMP_SZ];/**< Temporary pool buffer. */ 165 166 166 167 /* Socket */ … … 994 995 } 995 996 996 /* Duplicate the packet */ 997 /* Duplicate the packet. 998 * We don't need to keep the query, NS, and AR sections from the packet, 999 * so exclude from duplication. 1000 */ 997 1001 res_pool = pj_pool_create_on_buf("respool", cache->buf, sizeof(cache->buf)); 998 1002 PJ_TRY { 999 1003 cache->pkt = NULL; 1000 pj_dns_packet_dup(res_pool, pkt, &cache->pkt); 1004 pj_dns_packet_dup(res_pool, pkt, 1005 PJ_DNS_NO_QD | PJ_DNS_NO_NS | PJ_DNS_NO_AR, 1006 &cache->pkt); 1001 1007 } 1002 1008 PJ_CATCH_ANY { … … 1223 1229 } 1224 1230 } 1225 1226 /* We don't need NS and query section in the packet, so trim them. */1227 dns_pkt->hdr.qdcount = 0;1228 dns_pkt->hdr.nscount = 0;1229 1231 1230 1232 /* Save/update response cache. */
Note: See TracChangeset
for help on using the changeset viewer.