Changeset 559 for pjproject/trunk


Ignore:
Timestamp:
Jun 28, 2006 3:23:18 PM (18 years ago)
Author:
bennylp
Message:

Fixed bug in ioqueue IOCP: accept() callback is called with new socket handle already reset to -1

Location:
pjproject/trunk/pjlib/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/ioqueue_winnt.c

    r365 r559  
    185185        *accept_overlapped->newsock_ptr = accept_overlapped->newsock; 
    186186    accept_overlapped->operation = 0; 
    187     accept_overlapped->newsock = PJ_INVALID_SOCKET; 
    188187} 
    189188 
     
    633632                                           accept_rec->newsock, 
    634633                                           PJ_SUCCESS); 
     634                accept_rec->newsock = PJ_INVALID_SOCKET; 
    635635            } 
    636636            break; 
  • pjproject/trunk/pjlib/src/pjlib-test/ioq_tcp.c

    r433 r559  
    8383                              int status) 
    8484{ 
    85     PJ_UNUSED_ARG(sock); 
    86  
    87     callback_accept_key = key; 
    88     callback_accept_op = op_key; 
    89     callback_accept_status = status; 
     85    if (sock == PJ_INVALID_SOCKET) { 
     86 
     87        if (status != PJ_SUCCESS) { 
     88            /* Ignore. Could be blocking error */ 
     89            app_perror(".....warning: received error in on_ioqueue_accept() callback", 
     90                       status); 
     91        } else { 
     92            callback_accept_status = -61; 
     93            PJ_LOG(3,("", "..... on_ioqueue_accept() callback was given " 
     94                          "invalid socket and status is %d", status)); 
     95        } 
     96    } else { 
     97        callback_accept_key = key; 
     98        callback_accept_op = op_key; 
     99        callback_accept_status = status; 
     100    } 
    90101} 
    91102 
  • pjproject/trunk/pjlib/src/pjlib-test/test.h

    r509 r559  
    4949#define INCLUDE_TCP_IOQUEUE_TEST    GROUP_NETWORK 
    5050#define INCLUDE_IOQUEUE_PERF_TEST   GROUP_NETWORK 
    51 #define INCLUDE_IOQUEUE_UNREG_TEST  1   // GROUP_NETWORK 
     51#define INCLUDE_IOQUEUE_UNREG_TEST  GROUP_NETWORK 
    5252#define INCLUDE_FILE_TEST           GROUP_FILE 
    5353 
Note: See TracChangeset for help on using the changeset viewer.