summaryrefslogtreecommitdiff
path: root/pjsip/src/pjsua
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-02-10 14:04:05 +0000
committerBenny Prijono <bennylp@teluu.com>2006-02-10 14:04:05 +0000
commitbb9a7993790bd9aac174bf8f08344dbb16ad7aa1 (patch)
tree88db34634560ae7427b7a2ad0681bb7fbaf44a85 /pjsip/src/pjsua
parent313201cc693799d8f64186f63f5865e0ab35dcd0 (diff)
Added more logging, and fixed bug when ACK is responded!
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@175 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsua')
-rw-r--r--pjsip/src/pjsua/pjsua_core.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/pjsip/src/pjsua/pjsua_core.c b/pjsip/src/pjsua/pjsua_core.c
index fc110409..5e344301 100644
--- a/pjsip/src/pjsua/pjsua_core.c
+++ b/pjsip/src/pjsua/pjsua_core.c
@@ -486,7 +486,6 @@ pj_status_t pjsua_start(void)
status = init_sockets();
if (status != PJ_SUCCESS) {
- pj_caching_pool_destroy(&pjsua.cp);
pjsua_perror("init_sockets() has returned error", status);
return status;
}
@@ -620,7 +619,6 @@ pj_status_t pjsua_start(void)
pj_thread_join(pjsua.threads[i]);
pj_thread_destroy(pjsua.threads[i]);
}
- pj_caching_pool_destroy(&pjsua.cp);
return status;
}
}
@@ -665,15 +663,20 @@ pj_status_t pjsua_destroy(void)
pjsua.quit_flag = 1;
- /* Destroy sound framework: */
+ /* Destroy sound framework:
+ * (this should be done in pjmedia_shutdown())
+ */
pj_snd_deinit();
/* Wait worker threads to quit: */
for (i=0; i<pjsua.thread_cnt; ++i) {
- pj_thread_join(pjsua.threads[i]);
- pj_thread_destroy(pjsua.threads[i]);
+ if (pjsua.threads[i]) {
+ pj_thread_join(pjsua.threads[i]);
+ pj_thread_destroy(pjsua.threads[i]);
+ pjsua.threads[i] = NULL;
+ }
}
/* Destroy endpoint. */