sip: Allow controlling automatic account loading via environment

This commit is contained in:
Evangelos Ribeiro Tzaras
2021-04-05 02:33:31 +02:00
parent 0b73103384
commit 75d32d0924
2 changed files with 5 additions and 3 deletions

View File

@@ -322,10 +322,11 @@ 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;
#ifdef FOR_TESTING
auto_load_accounts = FALSE;
#endif
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;
if (calls_sip_provider_init_sofia (self, &error)) {
if (auto_load_accounts)