Changeset 5991 for pjproject/trunk/pjsip/src/pjsip/sip_transport_udp.c
- Timestamp:
- May 15, 2019 2:54:52 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_transport_udp.c
r5984 r5991 471 471 } 472 472 473 /* When creating this transport, reference count was incremented to flag 474 * this transport as permanent so it will not be destroyed by transport 475 * manager whenever idle. Application may or may not have cleared the 476 * flag (by calling pjsip_transport_dec_ref()), so in case it has not, 477 * let's do it now, so this transport can be destroyed. 478 */ 479 if (pj_atomic_get(tp->base.ref_cnt) > 0) 480 pjsip_transport_dec_ref(&tp->base); 481 482 /* Destroy transport */ 473 483 if (tp->grp_lock) { 474 484 pj_grp_lock_t *grp_lock = tp->grp_lock; … … 845 855 tp->base.destroy = &udp_destroy; 846 856 847 /* This is a permanent transport, so we initialize the ref count848 * to one so that transport manager don't destroy this transport849 * when there's no user!850 */851 pj_atomic_inc(tp->base.ref_cnt);852 853 857 /* Register to transport manager. */ 854 858 tp->base.tpmgr = pjsip_endpt_get_tpmgr(endpt); … … 857 861 goto on_error; 858 862 863 /* This is a permanent transport, so we initialize the ref count 864 * to one so that transport manager won't destroy this transport 865 * when there's no user! 866 */ 867 pjsip_transport_add_ref(&tp->base); 859 868 860 869 /* Create rdata and put it in the array. */
Note: See TracChangeset
for help on using the changeset viewer.