mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-07 12:25:31 +00:00
sip: provider: Rename test environment variable
This commit is contained in:
parent
fd9b57c1b3
commit
1a4b501653
2 changed files with 7 additions and 7 deletions
|
@ -71,6 +71,7 @@ struct _CallsSipProvider
|
||||||
CallsSipContext *ctx;
|
CallsSipContext *ctx;
|
||||||
SipEngineState sip_state;
|
SipEngineState sip_state;
|
||||||
|
|
||||||
|
gboolean use_memory_backend;
|
||||||
gchar *filename;
|
gchar *filename;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -294,15 +295,14 @@ 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;
|
const gchar *env_sip_test;
|
||||||
const gchar *env_do_not_auto_load;
|
|
||||||
|
|
||||||
env_do_not_auto_load = g_getenv ("CALLS_SIP_DO_NOT_AUTOLOAD");
|
env_sip_test = g_getenv ("CALLS_SIP_TEST");
|
||||||
if (env_do_not_auto_load && env_do_not_auto_load[0] != '\0')
|
if (env_sip_test && env_sip_test[0] != '\0')
|
||||||
auto_load_accounts = FALSE;
|
self->use_memory_backend = TRUE;
|
||||||
|
|
||||||
if (calls_sip_provider_init_sofia (self, &error)) {
|
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 ();
|
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)) {
|
if (!g_key_file_load_from_file (key_file, self->filename, G_KEY_FILE_NONE, &error)) {
|
||||||
|
|
|
@ -8,7 +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',
|
'CALLS_SIP_TEST=1',
|
||||||
'CALLS_AUDIOSRC=audiotestsrc',
|
'CALLS_AUDIOSRC=audiotestsrc',
|
||||||
'CALLS_AUDIOSINK=fakesink',
|
'CALLS_AUDIOSINK=fakesink',
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue