Changeset 714


Ignore:
Timestamp:
Sep 13, 2006 11:48:45 PM (15 years ago)
Author:
bennylp
Message:

Fixed bug in client REGISTER: crashed when application calls pjsip_regc_register()/pjsip_regc_send() while previous REGISTER request has not been answered with final response. This occurs for example when pjsip_regc_register() is called in quick successions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip-ua/sip_reg.c

    r663 r714  
    372372    /* Add Contact header. */ 
    373373    msg = tdata->msg; 
    374     pjsip_msg_add_hdr(msg, (pjsip_hdr*) regc->contact_hdr); 
     374    pjsip_msg_add_hdr(msg, pjsip_hdr_shallow_clone(tdata->pool,  
     375                                                   regc->contact_hdr)); 
    375376    if (regc->expires_hdr) 
    376         pjsip_msg_add_hdr(msg, (pjsip_hdr*) regc->expires_hdr); 
     377        pjsip_msg_add_hdr(msg, pjsip_hdr_shallow_clone(tdata->pool, 
     378                                                       regc->expires_hdr)); 
    377379 
    378380    if (regc->timer.id != 0) { 
Note: See TracChangeset for help on using the changeset viewer.