Changeset 5848 for pjproject


Ignore:
Timestamp:
Jul 30, 2018 2:32:25 AM (6 years ago)
Author:
nanang
Message:

Re #2135: Updated 'pjsip-test' to adapt to the recent library changes.

Location:
pjproject/trunk/pjsip/src/test
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/test/dns_test.c

    r5170 r5848  
    5151    pj_dns_parsed_query q; 
    5252    pj_dns_parsed_rr ans[4]; 
    53     pj_dns_parsed_rr ar[5]; 
     53    pj_dns_parsed_rr ar[10]; 
    5454    pj_str_t tmp; 
    5555    unsigned i; 
     
    7373     example.com.       3600 IN A       5.5.5.5 
    7474 
     75     ; Additionally, add corresponding empty AAAA records for all A records 
    7576     */ 
    7677    pj_bzero(&pkt, sizeof(pkt)); 
     
    152153    ar[4].rdata.a.ip_addr = pj_inet_addr(pj_cstr(&tmp, "5.5.5.5")); 
    153154 
     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 
    154163    /*  
    155164     * Create individual A records for all hosts in "example.com" domain. 
     
    163172        q.type = ar[i].type; 
    164173        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        } 
    167179 
    168180        pj_dns_resolver_add_entry( resv, &pkt, PJ_FALSE); 
     
    213225        sip06.domain.com. 3600 IN A       6.6.6.6 
    214226        sip07.domain.com. 3600 IN A       7.7.7.7 
     227 
     228        ; Additionally, add corresponding empty AAAA records for all A records 
    215229     */ 
    216230 
     
    268282 
    269283    pkt.hdr.qdcount = 1; 
     284    pkt.hdr.anscount = 1; 
    270285    pkt.q = &q; 
    271286    q.name = ans[0].name; 
     
    274289 
    275290    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 
    276297 
    277298    /* Add the A record for sip07.domain.com */ 
     
    283304 
    284305    pkt.hdr.qdcount = 1; 
     306    pkt.hdr.anscount = 1; 
    285307    pkt.q = &q; 
    286308    q.name = ans[0].name; 
     
    289311 
    290312    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 
    291319 
    292320    pkt.hdr.qdcount = 0; 
  • pjproject/trunk/pjsip/src/test/msg_test.c

    r4587 r5848  
    11081108        /* Proxy-Authenticate, testing which params should be quoted */ 
    11091109        "Proxy-Authenticate", NULL, 
    1110         "Digest  realm=\"realm\",domain=\"sip:domain\",nonce=\"nonce\","  \ 
     1110        "Digest realm=\"realm\",domain=\"sip:domain\",nonce=\"nonce\","  \ 
    11111111                "opaque=\"opaque\",stale=true,algorithm=MD5,qop=\"auth\"", 
    11121112        &hdr_test_proxy_authenticate 
  • pjproject/trunk/pjsip/src/test/tsx_basic_test.c

    r4898 r5848  
    275275            &tsx_create_and_send_req, 
    276276            "sip:user@somehost", 
    277             1, 
     277            3000, /* Wait for DNS timeout, dec ref to the group lock is done in DNS+send callback */ 
    278278            15000 
    279279        }, 
     
    289289            &tsx_create_and_send_req, 
    290290            "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 */ 
    292292            60000 
    293293        }, 
  • pjproject/trunk/pjsip/src/test/tsx_uas_test.c

    r5170 r5848  
    14901490        { 50, 10,   TEST10_BRANCH_ID, "test10: failed transport in TRYING state (50 ms delay)" }, 
    14911491        { 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)" }, 
    14931495        { 0,  2500, TEST12_BRANCH_ID, "test12: failed transport in COMPLETED state (no delay)" }, 
    14941496        //Not applicable (maybe) 
     
    15271529 
    15281530        pjsip_loop_set_failure(loop, 1, NULL); 
     1531        PJ_LOG(5,(THIS_FILE, "   transport loop fail mode set")); 
    15291532 
    15301533        end_test = now; 
Note: See TracChangeset for help on using the changeset viewer.