From fb9e3b3a6649cc5cbe0c6747cb1918f3be71ba06 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Tue, 8 Nov 2005 12:46:10 +0000 Subject: Linux alpha test git-svn-id: http://svn.pjsip.org/repos/pjproject/main@35 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib/include/pj/config.h | 4 ++-- pjlib/src/pj/ioqueue_common_abs.c | 5 +++-- pjlib/src/pj/os_core_unix.c | 2 +- pjlib/src/pjlib-test/exception.c | 3 +++ pjlib/src/pjlib-test/list.c | 4 ++-- 5 files changed, 11 insertions(+), 7 deletions(-) (limited to 'pjlib') diff --git a/pjlib/include/pj/config.h b/pjlib/include/pj/config.h index 5437dcaa..597c4d9f 100644 --- a/pjlib/include/pj/config.h +++ b/pjlib/include/pj/config.h @@ -226,10 +226,10 @@ * maximum number of socket handles passed to select() (i.e. FD_SETSIZE will * be set to this value). * - * Default: 64 + * Default: 256 */ #ifndef PJ_IOQUEUE_MAX_HANDLES -# define PJ_IOQUEUE_MAX_HANDLES (64) +# define PJ_IOQUEUE_MAX_HANDLES (256) #endif /** diff --git a/pjlib/src/pj/ioqueue_common_abs.c b/pjlib/src/pj/ioqueue_common_abs.c index 35f86a06..4cffcae4 100644 --- a/pjlib/src/pj/ioqueue_common_abs.c +++ b/pjlib/src/pj/ioqueue_common_abs.c @@ -18,9 +18,10 @@ static void ioqueue_init( pj_ioqueue_t *ioqueue ) static pj_status_t ioqueue_destroy(pj_ioqueue_t *ioqueue) { - if (ioqueue->auto_delete_lock && ioqueue->lock ) + if (ioqueue->auto_delete_lock && ioqueue->lock ) { + pj_lock_release(ioqueue->lock); return pj_lock_destroy(ioqueue->lock); - else + } else return PJ_SUCCESS; } diff --git a/pjlib/src/pj/os_core_unix.c b/pjlib/src/pj/os_core_unix.c index 0c951e99..3892b64b 100644 --- a/pjlib/src/pj/os_core_unix.c +++ b/pjlib/src/pj/os_core_unix.c @@ -260,7 +260,7 @@ static void *thread_main(void *param) PJ_LOG(6,(rec->obj_name, "Thread started")); /* Call user's entry! */ - result = (void*) (*rec->proc)(rec->arg); + result = (void*)(long)(*rec->proc)(rec->arg); /* Done. */ PJ_LOG(6,(rec->obj_name, "Thread quitting")); diff --git a/pjlib/src/pjlib-test/exception.c b/pjlib/src/pjlib-test/exception.c index fcbe098c..31a4a545 100644 --- a/pjlib/src/pjlib-test/exception.c +++ b/pjlib/src/pjlib-test/exception.c @@ -83,6 +83,9 @@ static int test(void) if (!rc) rc = 0; } PJ_DEFAULT { + int id = PJ_GET_EXCEPTION(); + PJ_LOG(3,("", "...error: got unexpected exception %d (%s)", + id, pj_exception_id_name(id))); if (!rc) rc = -20; } PJ_END; diff --git a/pjlib/src/pjlib-test/list.c b/pjlib/src/pjlib-test/list.c index d9f097c5..4184e801 100644 --- a/pjlib/src/pjlib-test/list.c +++ b/pjlib/src/pjlib-test/list.c @@ -40,7 +40,7 @@ typedef struct list_node static int compare_node(void *value, const pj_list_type *nd) { list_node *node = (list_node*)nd; - return ((int)value == node->value) ? 0 : -1; + return ((long)value == node->value) ? 0 : -1; } #define PJ_SIGNED_ARRAY_SIZE(a) ((int)PJ_ARRAY_SIZE(a)) @@ -190,7 +190,7 @@ int list_test() if (p != &nodes[i]) { return -1; } - p = (list_node*) pj_list_search(&list, (void*)i, &compare_node); + p = (list_node*) pj_list_search(&list, (void*)(long)i, &compare_node); pj_assert( p == &nodes[i] ); if (p != &nodes[i]) { return -1; -- cgit v1.2.3