Ignore:
Timestamp:
Aug 11, 2006 12:42:50 PM (18 years ago)
Author:
bennylp
Message:

Fixed bugs in previous deadlock workaround

File:
1 edited

Legend:

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

    r671 r673  
    587587 
    588588    /* Lock the dialog */ 
     589    PJ_LOG(6,(dlg->obj_name, "UA layer acquiring dialog lock for request")); 
    589590    pjsip_dlg_inc_lock(dlg); 
     591 
     592    /* Pass to dialog. */ 
     593    pjsip_dlg_on_rx_request(dlg, rdata); 
     594 
     595    /* Unlock the dialog. This may destroy the dialog */ 
     596    pjsip_dlg_dec_lock(dlg); 
    590597 
    591598    /* Done processing in the UA */ 
    592599    pj_mutex_unlock(mod_ua.mutex); 
    593  
    594     /* Pass to dialog. */ 
    595     pjsip_dlg_on_rx_request(dlg, rdata); 
    596  
    597     /* Unlock the dialog. This may destroy the dialog */ 
    598     pjsip_dlg_dec_lock(dlg); 
    599600 
    600601    /* Report as handled. */ 
     
    783784 
    784785    /* Acquire lock to the dialog. */ 
     786    PJ_LOG(6,(dlg->obj_name, "UA layer acquiring dialog lock for response")); 
    785787    pjsip_dlg_inc_lock(dlg); 
     788 
     789    /* Pass the response to the dialog. */ 
     790    pjsip_dlg_on_rx_response(dlg, rdata); 
     791 
     792    /* Unlock the dialog. This may destroy the dialog. */ 
     793    pjsip_dlg_dec_lock(dlg); 
    786794 
    787795    /* Unlock dialog hash table. */ 
    788796    pj_mutex_unlock(mod_ua.mutex); 
    789  
    790     /* Pass the response to the dialog. */ 
    791     pjsip_dlg_on_rx_response(dlg, rdata); 
    792  
    793     /* Unlock the dialog. This may destroy the dialog. */ 
    794     pjsip_dlg_dec_lock(dlg); 
    795797 
    796798    /* Done. */ 
Note: See TracChangeset for help on using the changeset viewer.