From 1698328b74967bff2b86c705747b40b526275377 Mon Sep 17 00:00:00 2001 From: Riza Sulistyo Date: Tue, 23 Apr 2013 07:53:25 +0000 Subject: Re #1643: Modification to avoid namespace conflict with pjsua git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4489 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip-apps/src/pjsua/main.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'pjsip-apps/src/pjsua/main.c') diff --git a/pjsip-apps/src/pjsua/main.c b/pjsip-apps/src/pjsua/main.c index 4df0a56e..048eea8f 100644 --- a/pjsip-apps/src/pjsua/main.c +++ b/pjsip-apps/src/pjsua/main.c @@ -24,7 +24,7 @@ static pj_bool_t running = PJ_TRUE; static pj_status_t receive_end_sig; static pj_thread_t *sig_thread; -static app_cfg_t cfg; +static pjsua_app_cfg_t cfg; /* Called when CLI (re)started */ void on_app_started(pj_status_t status, const char *msg) @@ -32,13 +32,12 @@ void on_app_started(pj_status_t status, const char *msg) pj_perror(3, THIS_FILE, status, (msg)?msg:""); } -pj_bool_t on_app_stopped(pj_bool_t restart, int argc, char** argv) +void on_app_stopped(pj_bool_t restart, int argc, char** argv) { cfg.argc = argc; cfg.argv = argv; running = restart; - return PJ_TRUE; } #if defined(PJ_WIN32) && PJ_WIN32!=0 @@ -60,7 +59,7 @@ static BOOL WINAPI CtrlHandler(DWORD fdwCtrlType) pj_thread_register("ctrlhandler", handler_desc, &sig_thread); PJ_LOG(3,(THIS_FILE, "Ctrl-C detected, quitting..")); receive_end_sig = PJ_TRUE; - app_destroy(); + pjsua_app_destroy(); ExitProcess(1); PJ_UNREACHED(return TRUE;) @@ -104,19 +103,19 @@ int main(int argc, char *argv[]) setup_socket_signal(); while (running) { - status = app_init(&cfg); + status = pjsua_app_init(&cfg); if (status == PJ_SUCCESS) { - status = app_run(PJ_TRUE); + status = pjsua_app_run(PJ_TRUE); } else { pj_perror(3, THIS_FILE, status, "Failed init"); running = PJ_FALSE; } if (!receive_end_sig) { - app_destroy(); + pjsua_app_destroy(); /* This is on purpose */ - app_destroy(); + pjsua_app_destroy(); } else { pj_thread_join(sig_thread); } -- cgit v1.2.3