summaryrefslogtreecommitdiff
path: root/pjlib/src/pj/activesock.c
diff options
context:
space:
mode:
Diffstat (limited to 'pjlib/src/pj/activesock.c')
-rw-r--r--pjlib/src/pj/activesock.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pjlib/src/pj/activesock.c b/pjlib/src/pj/activesock.c
index bbe10676..0f322834 100644
--- a/pjlib/src/pj/activesock.c
+++ b/pjlib/src/pj/activesock.c
@@ -370,7 +370,7 @@ PJ_DEF(pj_status_t) pj_activesock_start_read2( pj_activesock_t *asock,
pj_ssize_t size_to_read;
r->pkt = (pj_uint8_t*)readbuf[i];
- r->max_size = size_to_read = buff_size;
+ size_to_read = r->max_size = buff_size;
status = pj_ioqueue_recv(asock->key, &r->op_key, r->pkt, &size_to_read,
PJ_IOQUEUE_ALWAYS_ASYNC | flags);
@@ -429,7 +429,7 @@ PJ_DEF(pj_status_t) pj_activesock_start_recvfrom2( pj_activesock_t *asock,
pj_ssize_t size_to_read;
r->pkt = (pj_uint8_t*) readbuf[i];
- r->max_size = size_to_read = buff_size;
+ size_to_read = r->max_size = buff_size;
r->src_addr_len = sizeof(r->src_addr);
status = pj_ioqueue_recvfrom(asock->key, &r->op_key, r->pkt,
@@ -532,7 +532,7 @@ static void ioqueue_on_read_complete(pj_ioqueue_key_t *key,
* oriented, it means connection has been closed. For datagram
* sockets, it means we've got some error (e.g. EWOULDBLOCK).
*/
- status = -bytes_read;
+ status = (pj_status_t)-bytes_read;
}
/* Set default remainder to zero */