Ignore:
Timestamp:
Jan 27, 2010 9:09:27 AM (13 years ago)
Author:
bennylp
Message:

Fixed ticket #1036: Stray timer may be registered by SIP TCP and TLS transport in destroy routine, which could crash the program on Symbian (thanks Tamàs Solymosi for the report)

File:
1 edited

Legend:

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

    r2915 r3077  
    817817    if (pj_atomic_dec_and_get(tp->ref_cnt) == 0) { 
    818818        pj_lock_acquire(tp->tpmgr->lock); 
    819         /* Verify again. */ 
    820         if (pj_atomic_get(tp->ref_cnt) == 0) { 
     819        /* Verify again. Do not register timer if the transport is 
     820         * being destroyed. 
     821         */ 
     822        if (pj_atomic_get(tp->ref_cnt) == 0 && !tp->is_destroying) { 
    821823            pj_time_val delay; 
    822824             
     
    898900    pj_lock_acquire(tp->lock); 
    899901    pj_lock_acquire(mgr->lock); 
     902 
     903    tp->is_destroying = PJ_TRUE; 
    900904 
    901905    /* 
Note: See TracChangeset for help on using the changeset viewer.