diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-05-11 15:14:34 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-05-11 15:14:34 +0000 |
commit | 208776ec0c5c77623637a28b88391067df24e682 (patch) | |
tree | d474825faeaa48869df57b5470a8ba417ebf4489 /pjlib/src/pj/ioqueue_common_abs.c | |
parent | b4e01cefd4f354128396e85f205ccfa0879bc319 (diff) |
HUGE changeset to make the rest of the libraries compile with C++ mode
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1266 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src/pj/ioqueue_common_abs.c')
-rw-r--r-- | pjlib/src/pj/ioqueue_common_abs.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/pjlib/src/pj/ioqueue_common_abs.c b/pjlib/src/pj/ioqueue_common_abs.c index 82f962c2..8fd1be72 100644 --- a/pjlib/src/pj/ioqueue_common_abs.c +++ b/pjlib/src/pj/ioqueue_common_abs.c @@ -301,7 +301,7 @@ void ioqueue_dispatch_write_event(pj_ioqueue_t *ioqueue, pj_ioqueue_key_t *h) //write_op->op = 0; } else { pj_assert(!"Invalid operation type!"); - write_op->op = 0; + write_op->op = PJ_IOQUEUE_OP_NONE; send_rc = PJ_EBUG; } @@ -318,7 +318,7 @@ void ioqueue_dispatch_write_event(pj_ioqueue_t *ioqueue, pj_ioqueue_key_t *h) h->fd_type == PJ_SOCK_DGRAM) { - write_op->op = 0; + write_op->op = PJ_IOQUEUE_OP_NONE; if (h->fd_type != PJ_SOCK_DGRAM) { /* Write completion of the whole stream. */ @@ -375,7 +375,7 @@ void ioqueue_dispatch_read_event( pj_ioqueue_t *ioqueue, pj_ioqueue_key_t *h ) /* Get one accept operation from the list. */ accept_op = h->accept_list.next; pj_list_erase(accept_op); - accept_op->op = 0; + accept_op->op = PJ_IOQUEUE_OP_NONE; /* Clear bit in fdset if there is no more pending accept */ if (pj_list_empty(&h->accept_list)) @@ -417,18 +417,18 @@ void ioqueue_dispatch_read_event( pj_ioqueue_t *ioqueue, pj_ioqueue_key_t *h ) bytes_read = read_op->size; if ((read_op->op == PJ_IOQUEUE_OP_RECV_FROM)) { - read_op->op = 0; + read_op->op = PJ_IOQUEUE_OP_NONE; rc = pj_sock_recvfrom(h->fd, read_op->buf, &bytes_read, read_op->flags, read_op->rmt_addr, read_op->rmt_addrlen); } else if ((read_op->op == PJ_IOQUEUE_OP_RECV)) { - read_op->op = 0; + read_op->op = PJ_IOQUEUE_OP_NONE; rc = pj_sock_recv(h->fd, read_op->buf, &bytes_read, read_op->flags); } else { pj_assert(read_op->op == PJ_IOQUEUE_OP_READ); - read_op->op = 0; + read_op->op = PJ_IOQUEUE_OP_NONE; /* * User has specified pj_ioqueue_read(). * On Win32, we should do ReadFile(). But because we got @@ -561,7 +561,7 @@ PJ_DEF(pj_status_t) pj_ioqueue_recv( pj_ioqueue_key_t *key, PJ_CHECK_STACK(); read_op = (struct read_operation*)op_key; - read_op->op = 0; + read_op->op = PJ_IOQUEUE_OP_NONE; /* Check if key is closing. */ if (IS_CLOSING(key)) @@ -630,7 +630,7 @@ PJ_DEF(pj_status_t) pj_ioqueue_recvfrom( pj_ioqueue_key_t *key, return PJ_ECANCELLED; read_op = (struct read_operation*)op_key; - read_op->op = 0; + read_op->op = PJ_IOQUEUE_OP_NONE; /* Try to see if there's data immediately available. */ @@ -768,7 +768,7 @@ PJ_DEF(pj_status_t) pj_ioqueue_send( pj_ioqueue_key_t *key, } write_op->op = PJ_IOQUEUE_OP_SEND; - write_op->buf = (void*)data; + write_op->buf = (char*)data; write_op->size = *length; write_op->written = 0; write_op->flags = flags; @@ -848,7 +848,7 @@ PJ_DEF(pj_status_t) pj_ioqueue_sendto( pj_ioqueue_key_t *key, /* * Check that address storage can hold the address parameter. */ - PJ_ASSERT_RETURN(addrlen <= sizeof(pj_sockaddr_in), PJ_EBUG); + PJ_ASSERT_RETURN(addrlen <= (int)sizeof(pj_sockaddr_in), PJ_EBUG); /* * Schedule asynchronous send. @@ -883,7 +883,7 @@ PJ_DEF(pj_status_t) pj_ioqueue_sendto( pj_ioqueue_key_t *key, } write_op->op = PJ_IOQUEUE_OP_SEND_TO; - write_op->buf = (void*)data; + write_op->buf = (char*)data; write_op->size = *length; write_op->written = 0; write_op->flags = flags; @@ -920,7 +920,7 @@ PJ_DEF(pj_status_t) pj_ioqueue_accept( pj_ioqueue_key_t *key, return PJ_ECANCELLED; accept_op = (struct accept_operation*)op_key; - accept_op->op = 0; + accept_op->op = PJ_IOQUEUE_OP_NONE; /* Fast track: * See if there's new connection available immediately. @@ -1052,7 +1052,7 @@ PJ_DEF(pj_status_t) pj_ioqueue_post_completion( pj_ioqueue_key_t *key, while (op_rec != (void*)&key->read_list) { if (op_rec == (void*)op_key) { pj_list_erase(op_rec); - op_rec->op = 0; + op_rec->op = PJ_IOQUEUE_OP_NONE; pj_mutex_unlock(key->mutex); (*key->cb.on_read_complete)(key, op_key, bytes_status); @@ -1066,7 +1066,7 @@ PJ_DEF(pj_status_t) pj_ioqueue_post_completion( pj_ioqueue_key_t *key, while (op_rec != (void*)&key->write_list) { if (op_rec == (void*)op_key) { pj_list_erase(op_rec); - op_rec->op = 0; + op_rec->op = PJ_IOQUEUE_OP_NONE; pj_mutex_unlock(key->mutex); (*key->cb.on_write_complete)(key, op_key, bytes_status); @@ -1080,7 +1080,7 @@ PJ_DEF(pj_status_t) pj_ioqueue_post_completion( pj_ioqueue_key_t *key, while (op_rec != (void*)&key->accept_list) { if (op_rec == (void*)op_key) { pj_list_erase(op_rec); - op_rec->op = 0; + op_rec->op = PJ_IOQUEUE_OP_NONE; pj_mutex_unlock(key->mutex); (*key->cb.on_accept_complete)(key, op_key, |