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/pjsip/src/pjsip/sip_transport_tcp.c

    r5870 r5971  
    693693    pj_grp_lock_add_handler(tcp->grp_lock, pool, tcp, &tcp_on_destroy); 
    694694 
     695    tcp->base.grp_lock = tcp->grp_lock; 
     696 
    695697    /* Create active socket */ 
    696698    pj_activesock_cfg_default(&asock_cfg); 
     
    747749 
    748750on_error: 
    749     tcp_destroy(&tcp->base, status); 
     751    if (tcp->grp_lock && pj_grp_lock_get_ref(tcp->grp_lock)) 
     752        tcp_destroy(&tcp->base, status); 
     753    else 
     754        tcp_on_destroy(tcp); 
     755 
    750756    return status; 
    751757} 
     
    868874        pj_grp_lock_dec_ref(grp_lock); 
    869875        /* Transport may have been deleted at this point */ 
    870     } else { 
    871         tcp_on_destroy(tcp); 
    872876    } 
    873877 
Note: See TracChangeset for help on using the changeset viewer.