From a15ddb0c409317ffdfd4c6b764398719a4d222e2 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Wed, 22 Sep 2010 07:45:26 +0000 Subject: Fixed #1132: Assertion when (re)starting PJLIB on different thread git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3314 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib/src/pj/os_core_unix.c | 3 +++ pjlib/src/pj/os_core_win32.c | 3 +++ 2 files changed, 6 insertions(+) (limited to 'pjlib/src/pj') diff --git a/pjlib/src/pj/os_core_unix.c b/pjlib/src/pj/os_core_unix.c index 7d267713..917f8d10 100644 --- a/pjlib/src/pj/os_core_unix.c +++ b/pjlib/src/pj/os_core_unix.c @@ -213,6 +213,9 @@ PJ_DEF(void) pj_shutdown() pj_thread_local_free(thread_tls_id); thread_tls_id = -1; } + + /* Ticket #1132: Assertion when (re)starting PJLIB on different thread */ + pj_bzero(&main_thread, sizeof(main_thread)); #endif /* Clear static variables */ diff --git a/pjlib/src/pj/os_core_win32.c b/pjlib/src/pj/os_core_win32.c index 26190179..15ece797 100644 --- a/pjlib/src/pj/os_core_win32.c +++ b/pjlib/src/pj/os_core_win32.c @@ -246,6 +246,9 @@ PJ_DEF(void) pj_shutdown() /* Clear static variables */ pj_errno_clear_handlers(); + /* Ticket #1132: Assertion when (re)starting PJLIB on different thread */ + pj_bzero(main_thread, sizeof(main_thread)); + /* Shutdown Winsock */ WSACleanup(); } -- cgit v1.2.3