mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-11-16 05:15:36 +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:
parent
d160365ea4
commit
a8852bcc45
1 changed files with 11 additions and 1 deletions
|
@ -494,9 +494,15 @@ calls_sip_provider_constructed (GObject *object)
|
||||||
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)) {
|
||||||
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;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
calls_sip_provider_load_accounts (self, key_file);
|
calls_sip_provider_load_accounts (self, key_file);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -812,6 +818,10 @@ calls_sip_provider_load_accounts (CallsSipProvider *self,
|
||||||
|
|
||||||
groups = g_key_file_get_groups (key_file, NULL);
|
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++) {
|
for (gsize i = 0; groups[i] != NULL; i++) {
|
||||||
new_origin_from_keyfile_secret (self, key_file, groups[i]);
|
new_origin_from_keyfile_secret (self, key_file, groups[i]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue