Changeset 18 for pjproject/main/pjlib/src/pj/ioqueue_winnt.c
- Timestamp:
- Nov 7, 2005 3:47:28 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/main/pjlib/src/pj/ioqueue_winnt.c
r11 r18 36 36 37 37 /* 38 * OVERLAP structure for send and receive.38 * OVERLAPPPED structure for send and receive. 39 39 */ 40 40 typedef struct ioqueue_overlapped … … 76 76 }; 77 77 78 /* Type of handle in the key. */ 79 enum handle_type 80 { 81 HND_IS_UNKNOWN, 82 HND_IS_FILE, 83 HND_IS_SOCKET, 84 }; 85 78 86 /* 79 87 * Structure for individual socket. … … 84 92 HANDLE hnd; 85 93 void *user_data; 94 enum handle_type hnd_type; 86 95 #if PJ_HAS_TCP 87 96 int connecting; … … 318 327 rec->ioqueue = ioqueue; 319 328 rec->hnd = (HANDLE)sock; 329 rec->hnd_type = HND_IS_SOCKET; 320 330 rec->user_data = user_data; 321 331 pj_memcpy(&rec->cb, cb, sizeof(pj_ioqueue_callback)); … … 364 374 } 365 375 #endif 376 if (key->hnd_type == HND_IS_FILE) { 377 CloseHandle(key->hnd); 378 } 366 379 return PJ_SUCCESS; 367 380 } … … 506 519 507 520 PJ_CHECK_STACK(); 508 PJ_ASSERT_RETURN(key && op_key && buffer , PJ_EINVAL);521 PJ_ASSERT_RETURN(key && op_key && buffer && length, PJ_EINVAL); 509 522 510 523 op_key_rec = (union operation_key*)op_key->internal__;
Note: See TracChangeset
for help on using the changeset viewer.