diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-12-01 11:14:37 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-12-01 11:14:37 +0000 |
commit | b9032ff0ae71378939fda1bacde4ee89a685f6d1 (patch) | |
tree | a0e337be547e0d1b5760c2a226535f9e6f1f550c /pjsip-apps | |
parent | 634423cd1e3f12d6cc70c8e6564d40e986eb0312 (diff) |
Fixed ticket #29: calling pjsua_init() to reinitialize the whole libraries after pjsua_destroy() is called
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@839 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps')
-rw-r--r-- | pjsip-apps/src/pjsua/pjsua_app.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pjsip-apps/src/pjsua/pjsua_app.c b/pjsip-apps/src/pjsua/pjsua_app.c index c04e571e..81a6e5cb 100644 --- a/pjsip-apps/src/pjsua/pjsua_app.c +++ b/pjsip-apps/src/pjsua/pjsua_app.c @@ -361,6 +361,7 @@ static pj_status_t parse_args(int argc, char *argv[], unsigned i; /* Run pj_getopt once to see if user specifies config file to read. */ + pj_optind = 0; while ((c=pj_getopt_long(argc, argv, "", long_options, &option_index)) != -1) { @@ -2845,6 +2846,8 @@ pj_status_t app_main(void) pj_status_t app_destroy(void) { + pj_status_t status; + #ifdef STEREO_DEMO if (app_config.snd) { pjmedia_snd_port_destroy(app_config.snd); @@ -2857,7 +2860,11 @@ pj_status_t app_destroy(void) app_config.pool = NULL; } - return pjsua_destroy(); + status = pjsua_destroy(); + + pj_bzero(&app_config, sizeof(app_config)); + + return status; } |