From 77766af8777c6ffa868c271bca20a3c094c97ea8 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Mon, 27 Sep 2010 23:54:24 +0000 Subject: [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. --- tool/gkr-tool-import.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tool') 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; } -- cgit v1.2.1