Changeset 1372 for pjproject/trunk/pjsip/src/test-pjsip/dns_test.c
- Timestamp:
- Jun 19, 2007 8:46:02 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/test-pjsip/dns_test.c
r1266 r1372 48 48 /* Inject DNS SRV entry */ 49 49 pj_dns_parsed_packet pkt; 50 pj_dns_parsed_query q; 50 51 pj_dns_parsed_rr ans[4]; 51 52 pj_dns_parsed_rr ar[5]; … … 155 156 for (i=0; i<PJ_ARRAY_SIZE(ar); ++i) { 156 157 pj_bzero(&pkt, sizeof(pkt)); 158 pkt.hdr.flags = PJ_DNS_SET_QR(1); 159 pkt.hdr.qdcount = 1; 160 pkt.q = &q; 161 q.name = ar[i].name; 162 q.type = ar[i].type; 163 q.dnsclass = PJ_DNS_CLASS_IN; 157 164 pkt.hdr.anscount = 1; 158 pkt.hdr.flags = PJ_DNS_SET_QR(1);159 165 pkt.ans = &ar[i]; 160 166 … … 260 266 ans[0].rdata.a.ip_addr = pj_inet_addr(pj_cstr(&tmp, "6.6.6.6")); 261 267 268 pkt.hdr.qdcount = 1; 269 pkt.q = &q; 270 q.name = ans[0].name; 271 q.type = ans[0].type; 272 q.dnsclass = ans[0].dnsclass; 273 262 274 pj_dns_resolver_add_entry( resv, &pkt, PJ_FALSE); 263 275 … … 269 281 ans[0].rdata.a.ip_addr = pj_inet_addr(pj_cstr(&tmp, "7.7.7.7")); 270 282 283 pkt.hdr.qdcount = 1; 284 pkt.q = &q; 285 q.name = ans[0].name; 286 q.type = ans[0].type; 287 q.dnsclass = ans[0].dnsclass; 288 271 289 pj_dns_resolver_add_entry( resv, &pkt, PJ_FALSE); 290 291 pkt.hdr.qdcount = 0; 272 292 } 273 293
Note: See TracChangeset
for help on using the changeset viewer.