/* * Close linphonec, cleanly terminating * any pending call */ void linphonec_finish(int exit_status) { // Do not allow concurrent destroying to prevent glibc errors static bool_t terminating=FALSE; if (terminating) return; terminating=TRUE; linphonec_out("Terminating...\n"); /* Terminate any pending call */ linphone_core_terminate_all_calls(linphonec); #ifdef HAVE_READLINE linphonec_finish_readline(); #endif #if !defined(_WIN32_WCE) if (pipe_reader_run) stop_pipe_reader(); #endif /*_WIN32_WCE*/ linphone_core_destroy (linphonec); if (mylogfile != NULL && mylogfile != stdout) { fclose (mylogfile); } printf("\n"); exit(exit_status); }
/* * Close linphonec, cleanly terminating * any pending call */ void linphonec_finish(int exit_status) { printf("Terminating...\n"); /* Terminate any pending call */ linphonec_parse_command_line(&linphonec, "terminate"); linphonec_finish_readline(); linphone_core_uninit (&linphonec); if (mylogfile != NULL && mylogfile != stdout) { fclose (mylogfile); } exit(exit_status); }