mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-09-29 15:25:24 +00:00
sip: Allow controlling automatic account loading via environment
This commit is contained in:
parent
0b73103384
commit
75d32d0924
2 changed files with 5 additions and 3 deletions
|
@ -322,10 +322,11 @@ calls_sip_provider_constructed (GObject *object)
|
||||||
CallsSipProvider *self = CALLS_SIP_PROVIDER (object);
|
CallsSipProvider *self = CALLS_SIP_PROVIDER (object);
|
||||||
g_autoptr (GError) error = NULL;
|
g_autoptr (GError) error = NULL;
|
||||||
gboolean auto_load_accounts = TRUE;
|
gboolean auto_load_accounts = TRUE;
|
||||||
|
const gchar *env_do_not_auto_load;
|
||||||
|
|
||||||
#ifdef FOR_TESTING
|
env_do_not_auto_load = g_getenv ("CALLS_SIP_DO_NOT_AUTOLOAD");
|
||||||
auto_load_accounts = FALSE;
|
if (env_do_not_auto_load && env_do_not_auto_load[0] != '\0')
|
||||||
#endif
|
auto_load_accounts = FALSE;
|
||||||
|
|
||||||
if (calls_sip_provider_init_sofia (self, &error)) {
|
if (calls_sip_provider_init_sofia (self, &error)) {
|
||||||
if (auto_load_accounts)
|
if (auto_load_accounts)
|
||||||
|
|
|
@ -8,6 +8,7 @@ test_env = [
|
||||||
'PYTHONDONTWRITEBYTECODE=yes',
|
'PYTHONDONTWRITEBYTECODE=yes',
|
||||||
'MALLOC_CHECK_=2',
|
'MALLOC_CHECK_=2',
|
||||||
'NO_AT_BRIDGE=1',
|
'NO_AT_BRIDGE=1',
|
||||||
|
'CALLS_SIP_DO_NOT_AUTOLOAD=1',
|
||||||
]
|
]
|
||||||
|
|
||||||
test_cflags = [
|
test_cflags = [
|
||||||
|
|
Loading…
Reference in a new issue