1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-05-28 16:09:29 +00:00

sip-provider: Improve debugging of account loading

This should help diagnosing why the flatpak sometimes fails to add SIP accounts.
This commit is contained in:
Evangelos Ribeiro Tzaras 2023-04-10 08:31:44 +02:00
parent 208438236c
commit 243753d064

View file

@ -494,9 +494,15 @@ calls_sip_provider_constructed (GObject *object)
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)) {
g_debug ("Error loading key file: %s", error->message);
if (error->domain == G_FILE_ERROR &&
error->code == G_FILE_ERROR_NOENT)
g_debug ("Not loading SIP accounts: No such file '%s'", self->filename);
else
g_warning ("Error loading keyfile '%s': %s", self->filename, error->message);
goto out;
}
calls_sip_provider_load_accounts (self, key_file);
}
} else {
@ -812,6 +818,10 @@ calls_sip_provider_load_accounts (CallsSipProvider *self,
groups = g_key_file_get_groups (key_file, NULL);
g_debug ("Found %u accounts in keyfile '%s'",
g_strv_length (groups),
self->filename);
for (gsize i = 0; groups[i] != NULL; i++) {
new_origin_from_keyfile_secret (self, key_file, groups[i]);
}