diff options
author | Benny Prijono <bennylp@teluu.com> | 2009-08-17 15:33:45 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2009-08-17 15:33:45 +0000 |
commit | 11cfa6f01fae0418234b517996d86094632f6e17 (patch) | |
tree | db0a05e93e473b9a9983f89b4a2bb53182a6c000 /pjsip-apps/src/pjsua/pjsua_app.c | |
parent | d29873572ef5ef79cf37c76247b4eecd8928ec53 (diff) |
Misc (ticket #915): added reload command in pjsua to shutdown and reinitialize the library
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2892 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps/src/pjsua/pjsua_app.c')
-rw-r--r-- | pjsip-apps/src/pjsua/pjsua_app.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/pjsip-apps/src/pjsua/pjsua_app.c b/pjsip-apps/src/pjsua/pjsua_app.c index 36967d6a..0e9e50fd 100644 --- a/pjsip-apps/src/pjsua/pjsua_app.c +++ b/pjsip-apps/src/pjsua/pjsua_app.c @@ -146,6 +146,7 @@ static void ringback_start(pjsua_call_id call_id); static void ring_start(pjsua_call_id call_id); static void ring_stop(pjsua_call_id call_id); +pj_bool_t app_restart; /***************************************************************************** * Configuration manipulation @@ -2823,7 +2824,7 @@ static void keystroke_help(void) puts("| | V Adjust audio Volume | f Save config |"); puts("| S Send arbitrary REQUEST | Cp Codec priorities | f Save config |"); puts("+------------------------------+--------------------------+-------------------+"); - puts("| q QUIT sleep MS echo [0|1|txt] n: detect NAT type |"); + puts("| q QUIT L ReLoad sleep MS echo [0|1|txt] n: detect NAT type |"); puts("+=============================================================================+"); i = pjsua_call_get_count(); @@ -4103,10 +4104,13 @@ void console_app_main(const pj_str_t *uri_to_call) break; + case 'L': /* Restart */ + app_restart = PJ_TRUE; + /* Continues below */ + case 'q': goto on_exit; - case 'R': if (!pjsua_call_is_active(current_call)) { PJ_LOG(1,(THIS_FILE, "Call %d has gone", current_call)); @@ -4238,6 +4242,8 @@ pj_status_t app_init(int argc, char *argv[]) unsigned i; pj_status_t status; + app_restart = PJ_FALSE; + /* Create pjsua */ status = pjsua_create(); if (status != PJ_SUCCESS) |