Changeset 4207


Ignore:
Timestamp:
Jul 17, 2012 12:45:39 PM (12 years ago)
Author:
ming
Message:

Fixed #1577: assertion when TURN session is already destroyed

File:
1 edited

Legend:

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

    r4197 r4207  
    212212 
    213213    if (turn_sock->active_sock) { 
     214        pj_activesock_set_user_data(turn_sock->active_sock, NULL); 
    214215        pj_activesock_close(turn_sock->active_sock); 
    215216        turn_sock->active_sock = NULL; 
     
    464465 
    465466    turn_sock = (pj_turn_sock*) pj_activesock_get_user_data(asock); 
     467    if (!turn_sock) 
     468        return PJ_FALSE; 
     469 
     470    /* TURN session may have already been destroyed here. 
     471     * See ticket #1557 (http://trac.pjsip.org/repos/ticket/1557). 
     472     */ 
     473    if (!turn_sock->sess) { 
     474        sess_fail(turn_sock, "TURN session already destroyed", status); 
     475        return PJ_FALSE; 
     476    } 
    466477 
    467478    if (status != PJ_SUCCESS) { 
Note: See TracChangeset for help on using the changeset viewer.