Changeset 4791 for pjproject


Ignore:
Timestamp:
Mar 11, 2014 7:45:29 AM (8 years ago)
Author:
nanang
Message:

Fix #1747: Don't process message body in the incoming 200/UPDATE if we don't send offer in the UPDATE. Note this also fixes another issue: session timer should always inspect 200/UPDATE response (for session refresh) regardless availability of message body.

File:
1 edited

Legend:

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

    r4754 r4791  
    33413341    /* Process 2xx response */ 
    33423342    else if (tsx->state == PJSIP_TSX_STATE_COMPLETED && 
    3343         tsx->status_code/100 == 2 && 
    3344         e->body.tsx_state.src.rdata->msg_info.msg->body) 
    3345     { 
    3346         status = handle_timer_response(inv, e->body.tsx_state.src.rdata, 
    3347                                        PJ_FALSE); 
    3348         status = inv_check_sdp_in_incoming_msg(inv, tsx,  
    3349                                              e->body.tsx_state.src.rdata); 
     3343        tsx->status_code/100 == 2) 
     3344    { 
     3345        pjsip_rx_data *rdata = e->body.tsx_state.src.rdata; 
     3346        status = handle_timer_response(inv, rdata, PJ_FALSE); 
     3347 
     3348        if (rdata->msg_info.msg->body) { 
     3349            /* Only process remote SDP if we have sent local offer */ 
     3350            if (inv->neg && pjmedia_sdp_neg_get_state(inv->neg) ==  
     3351                                        PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER) 
     3352            { 
     3353                status = inv_check_sdp_in_incoming_msg(inv, tsx, rdata); 
     3354            } else { 
     3355                PJ_LOG(5,(THIS_FILE, "Ignored message body in %s as no local " 
     3356                                     "offer was sent", 
     3357                                     pjsip_rx_data_get_info(rdata))); 
     3358            } 
     3359        } 
    33503360        handled = PJ_TRUE; 
    33513361    } 
Note: See TracChangeset for help on using the changeset viewer.