Changeset 14 for pjproject/main/pjlib/src/pj/ioqueue_common_abs.c
- Timestamp:
- Nov 6, 2005 4:50:38 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/main/pjlib/src/pj/ioqueue_common_abs.c
r13 r14 1 1 /* $Id$ */ 2 2 3 #include <pj/ioqueue.h> 4 #include <pj/errno.h> 5 #include <pj/list.h> 6 #include <pj/sock.h> 7 #include <pj/lock.h> 8 #include <pj/assert.h> 9 #include <pj/string.h> 10 3 /* 4 * ioqueue_common_abs.c 5 * 6 * This contains common functionalities to emulate proactor pattern with 7 * various event dispatching mechanisms (e.g. select, epoll). 8 * 9 * This file will be included by the appropriate ioqueue implementation. 10 * This file is NOT supposed to be compiled as stand-alone source. 11 */ 11 12 12 13 static void ioqueue_init( pj_ioqueue_t *ioqueue ) … … 326 327 327 328 /* Call callback. */ 328 if (h->cb.on_accept_complete) 329 if (h->cb.on_accept_complete) { 329 330 (*h->cb.on_accept_complete)(h, 330 331 (pj_ioqueue_op_key_t*)accept_op, 331 332 *accept_op->accept_fd, rc); 333 } 332 334 333 335 } … … 337 339 struct read_operation *read_op; 338 340 pj_ssize_t bytes_read; 339 340 pj_assert(!pj_list_empty(&h->read_list));341 341 342 342 /* Get one pending read operation from the list. */ … … 378 378 // &bytes_read, NULL); 379 379 # elif (defined(PJ_HAS_UNISTD_H) && PJ_HAS_UNISTD_H != 0) 380 bytes_read = read(h->fd, h->rd_buf, bytes_read);380 bytes_read = read(h->fd, read_op->buf, bytes_read); 381 381 rc = (bytes_read >= 0) ? PJ_SUCCESS : pj_get_os_error(); 382 382 # elif defined(PJ_LINUX_KERNEL) && PJ_LINUX_KERNEL != 0 383 bytes_read = sys_read(h->fd, h->rd_buf, bytes_read);383 bytes_read = sys_read(h->fd, read_op->buf, bytes_read); 384 384 rc = (bytes_read >= 0) ? PJ_SUCCESS : -bytes_read; 385 385 # else
Note: See TracChangeset
for help on using the changeset viewer.