sip: Allow controlling automatic account loading via environment
This commit is contained in:
@@ -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");
|
||||||
|
if (env_do_not_auto_load && env_do_not_auto_load[0] != '\0')
|
||||||
auto_load_accounts = FALSE;
|
auto_load_accounts = FALSE;
|
||||||
#endif
|
|
||||||
|
|
||||||
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 = [
|
||||||
|
|||||||
Reference in New Issue
Block a user