[gnome-keyring] daemon: More indicative preconditions when startup ordering goes bad
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keyring] daemon: More indicative preconditions when startup ordering goes bad
- Date: Thu, 6 Mar 2014 17:48:02 +0000 (UTC)
commit cad5ed78f44e8546df2c824aa7b3b5e660a32d61
Author: Stef Walter <stefw gnome org>
Date: Thu Mar 6 16:10:04 2014 +0100
daemon: More indicative preconditions when startup ordering goes bad
daemon/dbus/gkd-dbus-secrets.c | 6 +++++-
daemon/login/gkd-login.c | 8 +++++++-
2 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/daemon/dbus/gkd-dbus-secrets.c b/daemon/dbus/gkd-dbus-secrets.c
index 2b7808e..58e0a8f 100644
--- a/daemon/dbus/gkd-dbus-secrets.c
+++ b/daemon/dbus/gkd-dbus-secrets.c
@@ -43,9 +43,13 @@ calculate_secrets_slot (void)
GckModule *module;
GList *modules;
GError *err = NULL;
+ CK_FUNCTION_LIST_PTR funcs;
/* TODO: Should we be handling just one module here? */
- module = gck_module_new (gkd_pkcs11_get_functions ());
+ funcs = gkd_pkcs11_get_functions ();
+ g_return_val_if_fail (funcs != NULL, NULL);
+
+ module = gck_module_new (funcs);
g_return_val_if_fail (module, NULL);
modules = g_list_prepend (NULL, module);
diff --git a/daemon/login/gkd-login.c b/daemon/login/gkd-login.c
index bf20824..2c0cb20 100644
--- a/daemon/login/gkd-login.c
+++ b/daemon/login/gkd-login.c
@@ -39,7 +39,13 @@
static GList*
module_instances (void)
{
- GckModule *module = gck_module_new (gkd_pkcs11_get_base_functions ());
+ CK_FUNCTION_LIST_PTR funcs;
+ GckModule *module;
+
+ funcs = gkd_pkcs11_get_base_functions ();
+ g_return_val_if_fail (funcs != NULL && "instances", NULL);
+
+ module = gck_module_new (funcs);
g_return_val_if_fail (module, NULL);
return g_list_append (NULL, module);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]