Ignore:
Timestamp:
Jan 17, 2020 12:59:51 AM (5 years ago)
Author:
ming
Message:

Closed #2261: Prevent unnecessary locking when adding group lock handler

File:
1 edited

Legend:

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

    r5984 r6136  
    682682 
    683683    /* Create group lock */ 
    684     status = pj_grp_lock_create(pool, NULL, &tcp->grp_lock); 
     684    status = pj_grp_lock_create_w_handler(pool, NULL, tcp, &tcp_on_destroy, 
     685                                          &tcp->grp_lock); 
    685686    if (status != PJ_SUCCESS) 
    686687        goto on_error; 
    687688 
    688689    pj_grp_lock_add_ref(tcp->grp_lock); 
    689     pj_grp_lock_add_handler(tcp->grp_lock, pool, tcp, &tcp_on_destroy); 
    690690 
    691691    tcp->base.grp_lock = tcp->grp_lock; 
Note: See TracChangeset for help on using the changeset viewer.