Ignore:
Timestamp:
Oct 2, 2019 3:42:13 AM (5 years ago)
Author:
ming
Message:

Fixed #2238: Local hold is not reset if there's failure during reinvite/update

We set local_hold later, after sending the message is successful.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c

    r6063 r6083  
    30293029                                                call->inv->pool_prov, 
    30303030                                                NULL, &sdp, NULL); 
    3031         call->local_hold = PJ_FALSE; 
    30323031    } 
    30333032    if (status != PJ_SUCCESS) { 
     
    30723071    call->med_update_success = PJ_FALSE; 
    30733072    status = pjsip_inv_send_msg( call->inv, tdata); 
    3074     if (status != PJ_SUCCESS) { 
     3073    if (status == PJ_SUCCESS && 
     3074        ((call->opt.flag & PJSUA_CALL_UNHOLD) && 
     3075         (call->opt.flag & PJSUA_CALL_NO_SDP_OFFER) == 0)) 
     3076    { 
     3077        call->local_hold = PJ_FALSE; 
     3078    } else if (status != PJ_SUCCESS) { 
    30753079        pjsua_perror(THIS_FILE, "Unable to send re-INVITE", status); 
    30763080        goto on_return; 
     
    31563160                                                call->inv->pool_prov, 
    31573161                                                NULL, &sdp, NULL); 
    3158         call->local_hold = PJ_FALSE; 
    31593162    } 
    31603163 
     
    32003203    call->med_update_success = PJ_FALSE; 
    32013204    status = pjsip_inv_send_msg( call->inv, tdata); 
    3202     if (status != PJ_SUCCESS) { 
     3205    if (status == PJ_SUCCESS && 
     3206        ((call->opt.flag & PJSUA_CALL_UNHOLD) && 
     3207         (call->opt.flag & PJSUA_CALL_NO_SDP_OFFER) == 0)) 
     3208    { 
     3209        call->local_hold = PJ_FALSE; 
     3210    } else if (status != PJ_SUCCESS) { 
    32033211        pjsua_perror(THIS_FILE, "Unable to send UPDATE request", status); 
    32043212        goto on_return; 
Note: See TracChangeset for help on using the changeset viewer.