From dde4bd8abf22ab5282b3be5f4e821748c51fdd4d Mon Sep 17 00:00:00 2001 From: Evangelos Ribeiro Tzaras Date: Wed, 5 May 2021 20:50:44 +0200 Subject: [PATCH] sip: provider: Don't warn when trying to add account multiple times A g_debug() will suffice which will let us get rid of g_test_expect_message() to as we don't need to guard against the warning anymore. --- plugins/sip/calls-sip-provider.c | 3 ++- tests/test-account.c | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/sip/calls-sip-provider.c b/plugins/sip/calls-sip-provider.c index 3f0c683..f68226c 100644 --- a/plugins/sip/calls-sip-provider.c +++ b/plugins/sip/calls-sip-provider.c @@ -469,7 +469,8 @@ calls_sip_provider_add_origin (CallsSipProvider *self, g_autofree char *name = NULL; g_object_get (credentials, "name", &name, NULL); - g_warning ("Cannot add credentials with name '%s' multiple times", name); + /* This could be a INFO level log once we have improved logging */ + g_debug ("Cannot add credentials with name '%s' multiple times", name); return NULL; } diff --git a/tests/test-account.c b/tests/test-account.c index 764c9df..acebcab 100644 --- a/tests/test-account.c +++ b/tests/test-account.c @@ -72,8 +72,6 @@ test_account_basic () g_object_unref (origin_bob); /* Try adding credentials a second time */ - g_test_expect_message ("CallsSipProvider", G_LOG_LEVEL_WARNING, - "Cannot add credentials with name 'Alice' multiple times"); g_assert_false (calls_account_provider_add_account (acc_provider, alice)); /* Remove credentials */