diff options
author | Benny Prijono <bennylp@teluu.com> | 2005-11-07 18:14:08 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2005-11-07 18:14:08 +0000 |
commit | 8b3f0c56c5c885134f3865539a7257a7ebb90387 (patch) | |
tree | 0388183e5ca1c7973c0b830bdbd0bedd58a9c315 /pjlib/src/pj/ioqueue_select.c | |
parent | e25a988d098a075f5519090c24237c3b97bc1323 (diff) |
UDP echo testing in Linux
git-svn-id: http://svn.pjsip.org/repos/pjproject/main@19 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src/pj/ioqueue_select.c')
-rw-r--r-- | pjlib/src/pj/ioqueue_select.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/pjlib/src/pj/ioqueue_select.c b/pjlib/src/pj/ioqueue_select.c index 886c3cda..09318d4e 100644 --- a/pjlib/src/pj/ioqueue_select.c +++ b/pjlib/src/pj/ioqueue_select.c @@ -66,15 +66,15 @@ PJ_DECL(pj_size_t) PJ_FD_COUNT(const pj_fd_set_t *fdsetp); /* * During debugging build, VALIDATE_FD_SET is set. * This will check the validity of the fd_sets. - */
+ */ /* #if defined(PJ_DEBUG) && PJ_DEBUG != 0 # define VALIDATE_FD_SET 1 #else # define VALIDATE_FD_SET 0 #endif -*/
-#define VALIDATE_FD_SET 0
+*/ +#define VALIDATE_FD_SET 0 /* * This describes each key. @@ -106,6 +106,14 @@ struct pj_ioqueue_t #include "ioqueue_common_abs.c" /* + * pj_ioqueue_name() + */ +PJ_DEF(const char*) pj_ioqueue_name(void) +{ + return "select"; +} + +/* * pj_ioqueue_create() * * Create select ioqueue. @@ -273,14 +281,14 @@ static void validate_sets(const pj_ioqueue_t *ioqueue, const pj_fd_set_t *xfdset) { pj_ioqueue_key_t *key; -
- /*
- * This basicly would not work anymore.
- * We need to lock key before performing the check, but we can't do
- * so because we're holding ioqueue mutex. If we acquire key's mutex
- * now, the will cause deadlock.
- */
- pj_assert(0);
+ + /* + * This basicly would not work anymore. + * We need to lock key before performing the check, but we can't do + * so because we're holding ioqueue mutex. If we acquire key's mutex + * now, the will cause deadlock. + */ + pj_assert(0); key = ioqueue->key_list.next; while (key != &ioqueue->key_list) { |