diff options
author | Benny Prijono <bennylp@teluu.com> | 2005-11-06 19:46:48 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2005-11-06 19:46:48 +0000 |
commit | 4539be1bf3b88417e3b52fdbeb17d6a74266cb4a (patch) | |
tree | 5db399f964cb95937b02f66ee797d4ca7d14c334 /pjlib/src/pj/ioqueue_common_abs.c | |
parent | a5f8e7c270ac8c919dafe6c2fd0663ee6ce47fc4 (diff) |
Tested UDP echo server on Win2K
git-svn-id: http://svn.pjsip.org/repos/pjproject/main@17 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 | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/pjlib/src/pj/ioqueue_common_abs.c b/pjlib/src/pj/ioqueue_common_abs.c index 774d53e3..d5f8d657 100644 --- a/pjlib/src/pj/ioqueue_common_abs.c +++ b/pjlib/src/pj/ioqueue_common_abs.c @@ -287,9 +287,11 @@ void ioqueue_dispatch_write_event(pj_ioqueue_t *ioqueue, pj_ioqueue_key_t *h) /* Done. */ } else { - pj_assert(!"Descriptor is signaled but key " - "has no pending operation!"); - + /* + * This is normal; execution may fall here when multiple threads
+ * are signalled for the same event, but only one thread eventually
+ * able to process the event.
+ */ pj_mutex_unlock(h->mutex); } } @@ -416,6 +418,11 @@ void ioqueue_dispatch_read_event( pj_ioqueue_t *ioqueue, pj_ioqueue_key_t *h ) } } else { + /*
+ * This is normal; execution may fall here when multiple threads
+ * are signalled for the same event, but only one thread eventually
+ * able to process the event.
+ */
pj_mutex_unlock(h->mutex); } } @@ -616,7 +623,7 @@ PJ_DEF(pj_status_t) pj_ioqueue_send( pj_ioqueue_key_t *key, */ write_op = (struct write_operation*)op_key; write_op->op = PJ_IOQUEUE_OP_SEND; - write_op->buf = NULL; + write_op->buf = (void*)data; write_op->size = *length; write_op->written = 0; write_op->flags = flags; @@ -694,7 +701,7 @@ PJ_DEF(pj_status_t) pj_ioqueue_sendto( pj_ioqueue_key_t *key, */ write_op = (struct write_operation*)op_key; write_op->op = PJ_IOQUEUE_OP_SEND_TO; - write_op->buf = NULL; + write_op->buf = (void*)data; write_op->size = *length; write_op->written = 0; write_op->flags = flags; |