diff options
author | Stef Walter <stef@memberwebs.com> | 2010-09-27 23:54:24 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2010-09-27 23:54:24 +0000 |
commit | 77766af8777c6ffa868c271bca20a3c094c97ea8 (patch) | |
tree | 91e28ae53bd4767990f58ef56082037686c28daf /tool | |
parent | d5183211fe8c7e377e4e2faacb3b6896bf1d9c04 (diff) | |
download | gnome-keyring-77766af8777c6ffa868c271bca20a3c094c97ea8.tar.gz |
[gck] Cleanup use of 'full' functions.
* Expect GCancellable in more places.
* Remove a bunch of xxx_full() functions that are redundant.
* Add a few xxx_full() functions where we don't want to have
to fill in full mechanisms.
Diffstat (limited to 'tool')
-rw-r--r-- | tool/gkr-tool-import.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tool/gkr-tool-import.c b/tool/gkr-tool-import.c index 3c3f4888..f9355958 100644 --- a/tool/gkr-tool-import.c +++ b/tool/gkr-tool-import.c @@ -42,15 +42,20 @@ static GOptionEntry import_entries[] = { static void on_imported (GcrImporter *importer, GckObject *object) { + gulong attr_types[3]; GckAttributes *attrs; GckAttribute *id; CK_OBJECT_CLASS klass; const gchar *message; GError *err = NULL; gchar *label, *hex; - - attrs = gck_attributes_new_empty (CKA_LABEL, CKA_CLASS, CKA_ID, GCK_INVALID); - if (!gck_object_get_full (object, attrs, NULL, &err)) { + + attr_types[0] = CKA_LABEL; + attr_types[1] = CKA_CLASS; + attr_types[2] = CKA_ID; + + attrs = gck_object_get_full (object, attr_types, G_N_ELEMENTS (attr_types), NULL, &err); + if (attrs == NULL) { gkr_tool_handle_error (&err, "couldn't get imported object info"); return; } |