--- a/libpurple/purplecredentialmanager.c Sun Oct 09 04:50:08 2022 -0500
+++ b/libpurple/purplecredentialmanager.c Mon Oct 10 00:26:06 2022 -0500
@@ -443,15 +443,18 @@
g_clear_object(&previous);
- /* Finally update the preference. */
- settings = g_settings_new_with_backend("im.pidgin.Purple.Credentials",
- purple_core_get_settings_backend());
+ /* Finally update the preference if we were given a new id. We assume, that + * a NULL id means we're shutting down and thus shouldn't update the + settings = g_settings_new_with_backend("im.pidgin.Purple.Credentials", + purple_core_get_settings_backend()); g_settings_set_string(settings, "active-provider", id);
- g_settings_reset(settings, "active-provider");
+ g_object_unref(settings); - g_object_unref(settings);
purple_debug_info("credential-manager", "set active provider to '%s'", id);
--- a/libpurple/purplecredentialmanager.h Sun Oct 09 04:50:08 2022 -0500
+++ b/libpurple/purplecredentialmanager.h Mon Oct 10 00:26:06 2022 -0500
@@ -119,6 +119,11 @@
* Changes the active #PurpleCredentialProvider of @manager to provider with an
+ * If @id is %NULL, it is assumed that the process is shutting down and that + * the active provider setting will be left intact. If you want to disable the + * active provider and keep running, you should set the active provider to + * [class@Purple.NoopCredentialProvider]. * Returns: %TRUE on success or %FALSE with @error set on failure.