Ignore:
Timestamp:
Oct 10, 2009 1:36:43 PM (15 years ago)
Author:
bennylp
Message:

Ticket #965: Receiving (malformed) re-INVITE with the same Via branch parameter value as previous INVITE would raise assertion (thanks Daniel Nanassy for the report)

  • also fix possible crashes when UAS transaction initialization fails for some reason
File:
1 edited

Legend:

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

    r2860 r2936  
    15331533    { 
    15341534        status = pjsip_tsx_create_uas(dlg->ua, rdata, &tsx); 
    1535         PJ_ASSERT_ON_FAIL(status==PJ_SUCCESS,{goto on_return;}); 
     1535        if (status != PJ_SUCCESS) { 
     1536            /* Once case for this is when re-INVITE contains same 
     1537             * Via branch value as previous INVITE (ticket #965). 
     1538             */ 
     1539            char errmsg[PJ_ERR_MSG_SIZE]; 
     1540            pj_str_t reason; 
     1541 
     1542            reason = pj_strerror(status, errmsg, sizeof(errmsg)); 
     1543            pjsip_endpt_respond_stateless(dlg->endpt, rdata, 500, &reason, 
     1544                                          NULL, NULL); 
     1545            goto on_return; 
     1546        } 
    15361547 
    15371548        /* Put this dialog in the transaction data. */ 
Note: See TracChangeset for help on using the changeset viewer.