Ignore:
Timestamp:
Mar 2, 2006 9:16:00 PM (18 years ago)
Author:
bennylp
Message:

Changed pjsip_msg_body_clone(), added pjsip_msg_body_create()

File:
1 edited

Legend:

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

    r175 r266  
    12361236    /* Add the message body, if any. */ 
    12371237    if (body) { 
    1238         tdata->msg->body = pj_pool_alloc(tdata->pool, sizeof(pjsip_msg_body)); 
    1239         status = pjsip_msg_body_clone( tdata->pool, tdata->msg->body, body ); 
    1240         if (status != PJ_SUCCESS) { 
     1238        tdata->msg->body = pjsip_msg_body_clone( tdata->pool, body ); 
     1239        if (tdata->msg->body == NULL) { 
    12411240            pjsip_tx_data_dec_ref(tdata); 
    12421241            return status; 
     
    12961295    /* Add the message body, if any. */ 
    12971296    if (body) { 
    1298         tdata->msg->body = pj_pool_alloc(tdata->pool, sizeof(pjsip_msg_body)); 
    1299         status = pjsip_msg_body_clone( tdata->pool, tdata->msg->body, body ); 
    1300         if (status != PJ_SUCCESS) { 
     1297        tdata->msg->body = pjsip_msg_body_clone( tdata->pool, body ); 
     1298        if (tdata->msg->body == NULL) { 
    13011299            pjsip_tx_data_dec_ref(tdata); 
    13021300            return status; 
     
    13181316    if (status != PJ_SUCCESS) { 
    13191317        pjsip_tx_data_dec_ref(tdata); 
    1320     } else { 
     1318    } else if (p_tsx) { 
    13211319        *p_tsx = tsx; 
    13221320    } 
Note: See TracChangeset for help on using the changeset viewer.