Changeset 5170 for pjproject/trunk/pjsip/src/test/dns_test.c
- Timestamp:
- Aug 25, 2015 8:45:46 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/test/dns_test.c
r3553 r5170 174 174 */ 175 175 for (i=0; i<PJ_ARRAY_SIZE(ans); ++i) { 176 pj_dns_parsed_query q ;176 pj_dns_parsed_query q2; 177 177 char buf[128]; 178 178 char *services[] = { "_sip._udp.", "_sip._tcp.", "_sips._tcp."}; … … 180 180 181 181 for (j=0; j<PJ_ARRAY_SIZE(services); ++j) { 182 q .dnsclass = PJ_DNS_CLASS_IN;183 q .type = PJ_DNS_TYPE_SRV;184 185 q .name.ptr = buf;182 q2.dnsclass = PJ_DNS_CLASS_IN; 183 q2.type = PJ_DNS_TYPE_SRV; 184 185 q2.name.ptr = buf; 186 186 pj_bzero(buf, sizeof(buf)); 187 pj_strcpy2(&q .name, services[j]);188 pj_strcat(&q .name, &ans[i].rdata.srv.target);187 pj_strcpy2(&q2.name, services[j]); 188 pj_strcat(&q2.name, &ans[i].rdata.srv.target); 189 189 190 190 pj_bzero(&pkt, sizeof(pkt)); … … 192 192 pkt.hdr.flags = PJ_DNS_SET_QR(1) | 193 193 PJ_DNS_SET_RCODE(PJ_DNS_RCODE_NXDOMAIN); 194 pkt.q = &q ;194 pkt.q = &q2; 195 195 196 196 pj_dns_resolver_add_entry( resv, &pkt, PJ_FALSE); … … 407 407 408 408 while (result.status == 0x12345678) { 409 int i = 0;409 int ii = 0; 410 410 pj_time_val timeout = { 1, 0 }; 411 411 pjsip_endpt_handle_events(endpt, &timeout); 412 if (i == 1)412 if (ii == 1) 413 413 pj_dns_resolver_dump(pjsip_endpt_get_resolver(endpt), PJ_TRUE); 414 414 }
Note: See TracChangeset
for help on using the changeset viewer.