Ignore:
Timestamp:
Oct 10, 2009 1:36:43 PM (10 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_transaction.c

    r2932 r2936  
    546546     * twice! 
    547547     */ 
    548     pj_assert(pj_hash_get( mod_tsx_layer.htable,  
    549                            tsx->transaction_key.ptr, 
    550                            tsx->transaction_key.slen,  
    551                            NULL) == NULL); 
     548    if(pj_hash_get(mod_tsx_layer.htable,  
     549                   tsx->transaction_key.ptr, 
     550                   tsx->transaction_key.slen,  
     551                   NULL)) 
     552    { 
     553        pj_mutex_unlock(mod_tsx_layer.mutex); 
     554        PJ_LOG(2,(THIS_FILE, "Unable to register transaction (key exists)")); 
     555        return PJ_EEXISTS; 
     556    } 
    552557 
    553558    TSX_TRACE_((THIS_FILE,  
     
    13451350                                  PJSIP_ROLE_UAS, &tsx->method, rdata); 
    13461351    if (status != PJ_SUCCESS) { 
     1352        unlock_tsx(tsx, &lck); 
    13471353        tsx_destroy(tsx); 
    13481354        return status; 
     
    13721378    status = pjsip_get_response_addr( tsx->pool, rdata, &tsx->res_addr ); 
    13731379    if (status != PJ_SUCCESS) { 
     1380        unlock_tsx(tsx, &lck); 
    13741381        tsx_destroy(tsx); 
    13751382        return status; 
     
    13941401    status = mod_tsx_layer_register_tsx(tsx); 
    13951402    if (status != PJ_SUCCESS) { 
     1403        unlock_tsx(tsx, &lck); 
    13961404        tsx_destroy(tsx); 
    13971405        return status; 
Note: See TracChangeset for help on using the changeset viewer.