summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2015-12-01 09:01:39 +0000
committerNanang Izzuddin <nanang@teluu.com>2015-12-01 09:01:39 +0000
commit755c8cba758853494e6a7ce70ed0f1a2115328e0 (patch)
tree86745b570402e77c466927d8030061d274467d26
parentbb4699479a908263281b8eaae42092bceca58d82 (diff)
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
-rw-r--r--pjsip/src/pjsua2/endpoint.cpp2
1 files changed, 2 insertions, 0 deletions
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;