Ignore:
Timestamp:
Apr 23, 2019 8:42:45 AM (20 months ago)
Author:
nanang
Message:

Fixed #2191:

  • Stricter double timer entry scheduling prevention.
  • Integrate group lock in SIP transport, e.g: for add/dec ref, for timer scheduling.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/timer.c

    r5934 r5971  
    503503 
    504504    /* Prevent same entry from being scheduled more than once */ 
    505     PJ_ASSERT_RETURN(entry->_timer_id < 1, PJ_EINVALIDOP); 
     505    //PJ_ASSERT_RETURN(entry->_timer_id < 1, PJ_EINVALIDOP); 
    506506 
    507507#if PJ_TIMER_DEBUG 
     
    513513     
    514514    lock_timer_heap(ht); 
     515 
     516    /* Prevent same entry from being scheduled more than once */ 
     517    if (pj_timer_entry_running(entry)) { 
     518        unlock_timer_heap(ht); 
     519        PJ_LOG(3,(THIS_FILE, "Bug! Rescheduling outstanding entry (%p)", 
     520                  entry)); 
     521        return PJ_EINVALIDOP; 
     522    } 
     523 
    515524    status = schedule_entry(ht, entry, &expires); 
    516525    if (status == PJ_SUCCESS) { 
Note: See TracChangeset for help on using the changeset viewer.