Changeset 5133


Ignore:
Timestamp:
Jul 14, 2015 1:18:19 AM (9 years ago)
Author:
ming
Message:

Fixed #1869: Destroy STUN session when cleaning up STUN server resolution

Thanks to Itay Bianco for the patch

Location:
pjproject/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjnath/src/pjnath/stun_transaction.c

    r5045 r5133  
    263263        /* We've been destroyed, don't access the object. */ 
    264264    } else if (status != PJ_SUCCESS) { 
    265         if (mod_count) { 
     265        if (mod_count || status == PJ_EINVALIDOP) { 
    266266                pj_timer_heap_cancel_if_active( tsx->timer_heap, 
    267267                                                &tsx->retransmit_timer, 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c

    r5131 r5133  
    11621162 
    11631163    PJSUA_LOCK(); 
     1164 
     1165    if (sess->stun_sock) { 
     1166        pj_stun_sock_destroy(sess->stun_sock); 
     1167        sess->stun_sock = NULL; 
     1168    } 
     1169 
     1170    if (pjsua_var.stun_status == PJ_EUNKNOWN || 
     1171        pjsua_var.stun_status == PJ_EPENDING) 
     1172    { 
     1173        pjsua_var.stun_status = PJNATH_ESTUNDESTROYED; 
     1174    } 
     1175     
    11641176    pj_list_erase(sess); 
     1177 
    11651178    PJSUA_UNLOCK(); 
    11661179 
Note: See TracChangeset for help on using the changeset viewer.