Ignore:
Timestamp:
Jun 22, 2006 10:29:12 PM (18 years ago)
Author:
bennylp
Message:

Fixed bug in sip_transport_udp: socket is closed after unregistered from ioqueue

File:
1 edited

Legend:

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

    r377 r543  
    337337 
    338338    /* Unregister from ioqueue. */ 
    339     if (tp->key) 
     339    if (tp->key) { 
    340340        pj_ioqueue_unregister(tp->key); 
    341  
    342     /* Close socket. */ 
    343     if (tp->sock && tp->sock != PJ_INVALID_SOCKET) 
    344         pj_sock_close(tp->sock); 
     341        tp->key = NULL; 
     342    } else { 
     343        /* Close socket. */ 
     344        if (tp->sock && tp->sock != PJ_INVALID_SOCKET) { 
     345            pj_sock_close(tp->sock); 
     346            tp->sock = PJ_INVALID_SOCKET; 
     347        } 
     348    } 
    345349 
    346350    /* Must poll ioqueue because IOCP calls the callback when socket 
Note: See TracChangeset for help on using the changeset viewer.