From 9c60087e5596935c2dbcf4072b710062977c1736 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 14 Mar 2013 15:46:09 +0100 Subject: [PATCH] fix build issue and add a --silent option to tester (no warning, no errors, only fatal) --- tester/liblinphone_tester.c | 5 ++++- tester/upnp_tester.c | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tester/liblinphone_tester.c b/tester/liblinphone_tester.c index 2b400c0f0..efe8f9a5e 100644 --- a/tester/liblinphone_tester.c +++ b/tester/liblinphone_tester.c @@ -372,11 +372,12 @@ static void linphone_android_ortp_log_handler(OrtpLogLevel lev, const char *fmt, void helper(const char *name) { fprintf(stderr,"%s \t--help\n" "\t\t\t--verbose\n" + "\t\t\t--silent\n" "\t\t\t--list-suites\n" "\t\t\t--list-tests \n" "\t\t\t--config \n" "\t\t\t--domain \n" - "\t\t\t---auth-domain \n" + "\t\t\t--auth-domain \n" #if HAVE_CU_GET_SUITE "\t\t\t--suite \n" "\t\t\t--test \n" @@ -412,6 +413,8 @@ int main (int argc, char *argv[]) { #else linphone_core_enable_logs_with_cb(linphone_android_ortp_log_handler); #endif + } else if (strcmp(argv[i],"--silent")==0){ + ortp_set_log_level_mask(ORTP_FATAL); } else if (strcmp(argv[i],"--domain")==0){ CHECK_ARG("--domain", ++i, argc); test_domain=argv[i]; diff --git a/tester/upnp_tester.c b/tester/upnp_tester.c index 95a132e62..f407808ac 100644 --- a/tester/upnp_tester.c +++ b/tester/upnp_tester.c @@ -27,7 +27,9 @@ static void upnp_start_n_stop(void) { int tmp = 0; LinphoneCoreManager* lc_upnp = linphone_core_manager_new2(liblinphone_tester_file_prefix, "upnp_rc", FALSE); wait_for(lc_upnp->lc,lc_upnp->lc,&tmp,1); +#ifdef BUILD_UPNP CU_ASSERT_TRUE(lc_upnp->lc->upnp != NULL); +#endif linphone_core_manager_destroy(lc_upnp); }