diff options
author | Nanang Izzuddin <nanang@teluu.com> | 2012-03-28 07:32:42 +0000 |
---|---|---|
committer | Nanang Izzuddin <nanang@teluu.com> | 2012-03-28 07:32:42 +0000 |
commit | 7d69da12d3c52fbd1ebea6f4a6a56d9595c05078 (patch) | |
tree | 95023be1918dab5aa4ddd41e3673de9255cad2c5 /pjsip/src | |
parent | 4db56d31d12520c8221ccf846af4e5138e12695c (diff) |
Re #1466: Moved down the atexit callbacks execution in pjmedia & pjsip endpoints to the very end of endpoint destroy sequence.
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@3988 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src')
-rw-r--r-- | pjsip/src/pjsip/sip_endpoint.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pjsip/src/pjsip/sip_endpoint.c b/pjsip/src/pjsip/sip_endpoint.c index 0125ae39..2831ea7d 100644 --- a/pjsip/src/pjsip/sip_endpoint.c +++ b/pjsip/src/pjsip/sip_endpoint.c @@ -578,13 +578,6 @@ PJ_DEF(void) pjsip_endpt_destroy(pjsip_endpoint *endpt) PJ_LOG(5, (THIS_FILE, "Destroying endpoing instance..")); - /* Call all registered exit callbacks */ - ecb = endpt->exit_cb_list.next; - while (ecb != &endpt->exit_cb_list) { - (*ecb->func)(endpt); - ecb = ecb->next; - } - /* Phase 1: stop all modules */ mod = endpt->module_list.prev; while (mod != &endpt->module_list) { @@ -615,6 +608,13 @@ PJ_DEF(void) pjsip_endpt_destroy(pjsip_endpoint *endpt) /* Destroy timer heap */ pj_timer_heap_destroy(endpt->timer_heap); + /* Call all registered exit callbacks */ + ecb = endpt->exit_cb_list.next; + while (ecb != &endpt->exit_cb_list) { + (*ecb->func)(endpt); + ecb = ecb->next; + } + /* Delete endpoint mutex. */ pj_mutex_destroy(endpt->mutex); |