From 755c8cba758853494e6a7ce70ed0f1a2115328e0 Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Tue, 1 Dec 2015 09:01:39 +0000 Subject: Misc (re #1882): Need to zero-fill pj_thread_desc in libRegisterThread() to avoid assertion in pj_thread_register() due to accidentally recognized as reused descriptor. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5204 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/src/pjsua2/endpoint.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pjsip/src') diff --git a/pjsip/src/pjsua2/endpoint.cpp b/pjsip/src/pjsua2/endpoint.cpp index 4fdc8dd6..b7bd7e45 100644 --- a/pjsip/src/pjsua2/endpoint.cpp +++ b/pjsip/src/pjsua2/endpoint.cpp @@ -1337,6 +1337,8 @@ void Endpoint::libRegisterThread(const string &name) throw(Error) PJSUA2_RAISE_ERROR(PJ_ENOMEM); } + pj_bzero(desc, sizeof(pj_thread_desc)); + status = pj_thread_register(name.c_str(), *desc, &thread); if (status == PJ_SUCCESS) { threadDescMap[thread] = desc; -- cgit v1.2.3