Ignore:
Timestamp:
Aug 5, 2009 6:41:23 PM (15 years ago)
Author:
nanang
Message:

Ticket #930:

  • Updated semantic of contact param in functions pjsip_dlg_create_uac(), pjsip_dlg_create_uas(), pjsip_endpt_create_request() and also variable pjsua_acc.contact to be Contact header value (was Contact URI).
  • Updated docs related to above modifications.
  • Fixed pjsua_im_send() in generating contact header, it should use pjsua_acc.contact instead, if it is set.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip/sip_util.c

    r2766 r2855  
    308308    pj_str_t tmp; 
    309309    pj_status_t status; 
     310    const pj_str_t STR_CONTACT = { "Contact", 7 }; 
    310311    PJ_USE_EXCEPTION; 
    311312 
     
    349350        /* Contact. */ 
    350351        if (param_contact) { 
    351             contact = pjsip_contact_hdr_create(tdata->pool); 
    352352            pj_strdup_with_null(tdata->pool, &tmp, param_contact); 
    353             contact->uri = pjsip_parse_uri( tdata->pool, tmp.ptr, tmp.slen, 
    354                                             PJSIP_PARSE_URI_AS_NAMEADDR); 
    355             if (contact->uri == NULL) { 
     353            contact = (pjsip_contact_hdr*) 
     354                      pjsip_parse_hdr(tdata->pool, &STR_CONTACT, tmp.ptr,  
     355                                      tmp.slen, NULL); 
     356            if (contact == NULL) { 
    356357                status = PJSIP_EINVALIDHDR; 
    357358                goto on_error; 
Note: See TracChangeset for help on using the changeset viewer.