Ignore:
Timestamp:
Aug 15, 2009 11:00:26 AM (15 years ago)
Author:
bennylp
Message:

More ticket #930 (New PJSUA-LIB account option to add user defined parameters to the Contact header)

  • Fixed test failure in pjsip_test, due to Contact URI is now interpreted as Contact header
File:
1 edited

Legend:

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

    r2638 r2883  
    418418                             "?X-Hdr-1=Header%201" 
    419419                             "&X-Empty-Hdr="); 
     420    pj_str_t contact; 
    420421    pj_str_t pname = pj_str("x-param"); 
    421422    pj_str_t hname = pj_str("X-Hdr-1"); 
     
    436437    PJ_LOG(3,(THIS_FILE, "   header param in URI to create request")); 
    437438 
     439    /* Due to #930, contact argument is now parsed as Contact header, so 
     440     * must enclose it with <> to make it be parsed as URI. 
     441     */ 
     442    pj_ansi_snprintf(msgbuf, sizeof(msgbuf), "<%.*s>", 
     443                     (int)target.slen, target.ptr); 
     444    contact.ptr = msgbuf; 
     445    contact.slen = strlen(msgbuf); 
     446 
    438447    /* Create request with header param in target URI. */ 
    439448    status = pjsip_endpt_create_request(endpt, &pjsip_invite_method, &target, 
    440                                         &target, &target, &target, NULL, -1, 
     449                                        &target, &target, &contact, NULL, -1, 
    441450                                        NULL, &tdata); 
    442451    if (status != 0) { 
Note: See TracChangeset for help on using the changeset viewer.