Changeset 2421


Ignore:
Timestamp:
Jan 14, 2009 3:34:00 PM (10 years ago)
Author:
bennylp
Message:

Inconsistent implementation vs documentation in pjsip_endpt_create_request_from_hdr(): it should allow NULL Call-ID to be specified. Thanks Cedric Leveque for the report

File:
1 edited

Legend:

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

    r2394 r2421  
    442442            contact = NULL; 
    443443        } 
    444         call_id = (pjsip_cid_hdr*) pjsip_hdr_clone(tdata->pool, param_call_id); 
     444        call_id = pjsip_cid_hdr_create(tdata->pool); 
     445        if (param_call_id != NULL && param_call_id->id.slen) 
     446            pj_strdup(tdata->pool, &call_id->id, &param_call_id->id); 
     447        else 
     448            pj_create_unique_string(tdata->pool, &call_id->id); 
     449 
    445450        cseq = pjsip_cseq_hdr_create(tdata->pool); 
    446451        if (param_cseq >= 0) 
Note: See TracChangeset for help on using the changeset viewer.