Ignore:
Timestamp:
Feb 5, 2016 4:29:17 AM (8 years ago)
Author:
nanang
Message:

Fixed #1902:

  • Crash when endpoint has multiple worker threads and SIP TCP transport is disconnected during incoming call handling.
  • Deprecated pjsip_dlg_create_uas(), replaced by pjsip_dlg_create_uas_and_inc_lock().
  • Serialized transaction state notifications (of 'terminated' and 'destroyed') in case of transport error.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/samples/sipecho.c

    r4537 r5241  
    418418    char temp[80], hostip[PJ_INET6_ADDRSTRLEN]; 
    419419    pj_str_t local_uri; 
    420     pjsip_dialog *dlg; 
     420    pjsip_dialog *dlg = NULL; 
    421421    pjsip_rdata_sdp_info *sdp_info; 
    422422    pjmedia_sdp_session *answer = NULL; 
     
    499499    local_uri = pj_str(temp); 
    500500 
    501     status = pjsip_dlg_create_uas( pjsip_ua_instance(), rdata, 
    502                                    &local_uri, &dlg); 
     501    status = pjsip_dlg_create_uas_and_inc_lock( pjsip_ua_instance(), rdata, 
     502                                                &local_uri, &dlg); 
    503503 
    504504    if (status == PJ_SUCCESS) 
    505505        answer = create_answer((int)(call-app.call), dlg->pool, sdp_info->sdp); 
     506 
    506507    if (status == PJ_SUCCESS) 
    507508        status = pjsip_inv_create_uas( dlg, rdata, answer, 0, &call->inv); 
     509 
     510    if (dlg) 
     511        pjsip_dlg_dec_lock(dlg); 
     512 
    508513    if (status == PJ_SUCCESS) 
    509514        status = pjsip_inv_initial_answer(call->inv, rdata, 100, 
Note: See TracChangeset for help on using the changeset viewer.