Changeset 5848
- Timestamp:
- Jul 30, 2018 2:32:25 AM (6 years ago)
- Location:
- pjproject/trunk/pjsip/src/test
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/test/dns_test.c
r5170 r5848 51 51 pj_dns_parsed_query q; 52 52 pj_dns_parsed_rr ans[4]; 53 pj_dns_parsed_rr ar[ 5];53 pj_dns_parsed_rr ar[10]; 54 54 pj_str_t tmp; 55 55 unsigned i; … … 73 73 example.com. 3600 IN A 5.5.5.5 74 74 75 ; Additionally, add corresponding empty AAAA records for all A records 75 76 */ 76 77 pj_bzero(&pkt, sizeof(pkt)); … … 152 153 ar[4].rdata.a.ip_addr = pj_inet_addr(pj_cstr(&tmp, "5.5.5.5")); 153 154 155 /* Add corresponding AAAA records for A records above */ 156 for (i = 0; i < 5; ++i) { 157 ar[5+i].name = ar[i].name; 158 ar[5+i].type = PJ_DNS_TYPE_AAAA; 159 ar[5+i].dnsclass = PJ_DNS_CLASS_IN; 160 ar[5+i].ttl = 3600; 161 } 162 154 163 /* 155 164 * Create individual A records for all hosts in "example.com" domain. … … 163 172 q.type = ar[i].type; 164 173 q.dnsclass = PJ_DNS_CLASS_IN; 165 pkt.hdr.anscount = 1; 166 pkt.ans = &ar[i]; 174 /* For now, AAAA always contains empty record */ 175 if (ar[i].type != PJ_DNS_TYPE_AAAA) { 176 pkt.hdr.anscount = 1; 177 pkt.ans = &ar[i]; 178 } 167 179 168 180 pj_dns_resolver_add_entry( resv, &pkt, PJ_FALSE); … … 213 225 sip06.domain.com. 3600 IN A 6.6.6.6 214 226 sip07.domain.com. 3600 IN A 7.7.7.7 227 228 ; Additionally, add corresponding empty AAAA records for all A records 215 229 */ 216 230 … … 268 282 269 283 pkt.hdr.qdcount = 1; 284 pkt.hdr.anscount = 1; 270 285 pkt.q = &q; 271 286 q.name = ans[0].name; … … 274 289 275 290 pj_dns_resolver_add_entry( resv, &pkt, PJ_FALSE); 291 292 /* Add corresponding AAAA record */ 293 q.type = PJ_DNS_TYPE_AAAA; 294 pkt.hdr.anscount = 0; 295 pj_dns_resolver_add_entry( resv, &pkt, PJ_FALSE); 296 276 297 277 298 /* Add the A record for sip07.domain.com */ … … 283 304 284 305 pkt.hdr.qdcount = 1; 306 pkt.hdr.anscount = 1; 285 307 pkt.q = &q; 286 308 q.name = ans[0].name; … … 289 311 290 312 pj_dns_resolver_add_entry( resv, &pkt, PJ_FALSE); 313 314 /* Add corresponding AAAA record */ 315 q.type = PJ_DNS_TYPE_AAAA; 316 pkt.hdr.anscount = 0; 317 pj_dns_resolver_add_entry( resv, &pkt, PJ_FALSE); 318 291 319 292 320 pkt.hdr.qdcount = 0; -
pjproject/trunk/pjsip/src/test/msg_test.c
r4587 r5848 1108 1108 /* Proxy-Authenticate, testing which params should be quoted */ 1109 1109 "Proxy-Authenticate", NULL, 1110 "Digest 1110 "Digest realm=\"realm\",domain=\"sip:domain\",nonce=\"nonce\"," \ 1111 1111 "opaque=\"opaque\",stale=true,algorithm=MD5,qop=\"auth\"", 1112 1112 &hdr_test_proxy_authenticate -
pjproject/trunk/pjsip/src/test/tsx_basic_test.c
r4898 r5848 275 275 &tsx_create_and_send_req, 276 276 "sip:user@somehost", 277 1,277 3000, /* Wait for DNS timeout, dec ref to the group lock is done in DNS+send callback */ 278 278 15000 279 279 }, … … 289 289 &tsx_create_and_send_req, 290 290 "sip:user@10.125.36.63:58517;transport=tcp", 291 1,291 22000, /* Wait for TCP connect timeout, dec ref to the group lock is done in send callback */ 292 292 60000 293 293 }, -
pjproject/trunk/pjsip/src/test/tsx_uas_test.c
r5170 r5848 1490 1490 { 50, 10, TEST10_BRANCH_ID, "test10: failed transport in TRYING state (50 ms delay)" }, 1491 1491 { 0, 1500, TEST11_BRANCH_ID, "test11: failed transport in PROCEEDING state (no delay)" }, 1492 { 50, 1500, TEST11_BRANCH_ID, "test11: failed transport in PROCEEDING state (50 ms delay)" }, 1492 // After ticket #2076, transport error will be ignored if tsx is in COMPLETED state, note that 1493 // tsx state will be shifted to COMPLETED state once 200 response is sent due to transport delay. 1494 //{ 50, 1500, TEST11_BRANCH_ID, "test11: failed transport in PROCEEDING state (50 ms delay)" }, 1493 1495 { 0, 2500, TEST12_BRANCH_ID, "test12: failed transport in COMPLETED state (no delay)" }, 1494 1496 //Not applicable (maybe) … … 1527 1529 1528 1530 pjsip_loop_set_failure(loop, 1, NULL); 1531 PJ_LOG(5,(THIS_FILE, " transport loop fail mode set")); 1529 1532 1530 1533 end_test = now;
Note: See TracChangeset
for help on using the changeset viewer.