[calls] sip: provider: Rename test environment variable



commit 1a4b5016537304c691685764985ebe1d5612b841
Author: Evangelos Ribeiro Tzaras <evangelos tzaras puri sm>
Date:   Tue Jul 6 12:57:49 2021 +0200

    sip: provider: Rename test environment variable

 plugins/sip/calls-sip-provider.c | 12 ++++++------
 tests/meson.build                |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/plugins/sip/calls-sip-provider.c b/plugins/sip/calls-sip-provider.c
index d962a439..807bb552 100644
--- a/plugins/sip/calls-sip-provider.c
+++ b/plugins/sip/calls-sip-provider.c
@@ -71,6 +71,7 @@ struct _CallsSipProvider
   CallsSipContext *ctx;
   SipEngineState sip_state;
 
+  gboolean use_memory_backend;
   gchar *filename;
 };
 
@@ -294,15 +295,14 @@ calls_sip_provider_constructed (GObject *object)
 {
   CallsSipProvider *self = CALLS_SIP_PROVIDER (object);
   g_autoptr (GError) error = NULL;
-  gboolean auto_load_accounts = TRUE;
-  const gchar *env_do_not_auto_load;
+  const gchar *env_sip_test;
 
-  env_do_not_auto_load = g_getenv ("CALLS_SIP_DO_NOT_AUTOLOAD");
-  if (env_do_not_auto_load && env_do_not_auto_load[0] != '\0')
-    auto_load_accounts = FALSE;
+  env_sip_test = g_getenv ("CALLS_SIP_TEST");
+  if (env_sip_test && env_sip_test[0] != '\0')
+    self->use_memory_backend = TRUE;
 
   if (calls_sip_provider_init_sofia (self, &error)) {
-    if (auto_load_accounts) {
+    if (!self->use_memory_backend) {
       g_autoptr (GKeyFile) key_file = g_key_file_new ();
 
       if (!g_key_file_load_from_file (key_file, self->filename, G_KEY_FILE_NONE, &error)) {
diff --git a/tests/meson.build b/tests/meson.build
index 091d2a35..8e123047 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -8,7 +8,7 @@ test_env = [
   'PYTHONDONTWRITEBYTECODE=yes',
   'MALLOC_CHECK_=2',
   'NO_AT_BRIDGE=1',
-  'CALLS_SIP_DO_NOT_AUTOLOAD=1',
+  'CALLS_SIP_TEST=1',
   'CALLS_AUDIOSRC=audiotestsrc',
   'CALLS_AUDIOSINK=fakesink',
 ]


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]