[gnome-keyring] [pkcs11] Mark various destruct timeout attributes as used.



commit 263af0662a86969c133daeba5eefa11ab7597723
Author: Stef Walter <stef memberwebs com>
Date:   Sun Feb 7 16:32:31 2010 +0000

    [pkcs11] Mark various destruct timeout attributes as used.
    
    Fixes warnings and assertions.

 pkcs11/gck/gck-object.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/pkcs11/gck/gck-object.c b/pkcs11/gck/gck-object.c
index 0b2544f..ec74031 100644
--- a/pkcs11/gck/gck-object.c
+++ b/pkcs11/gck/gck-object.c
@@ -317,7 +317,6 @@ gck_object_real_create_attributes (GckObject *self, GckSession *session,
 	transient_attr = gck_attributes_find (attrs, n_attrs, CKA_GNOME_TRANSIENT);
 	if (transient_attr) {
 		rv = gck_attribute_get_bool (transient_attr, &transient);
-		gck_attribute_consume (transient_attr);
 		if (rv != CKR_OK) {
 			gck_transaction_fail (transaction, rv);
 			return;
@@ -332,6 +331,10 @@ gck_object_real_create_attributes (GckObject *self, GckSession *session,
 			transient = TRUE;
 	}
 
+	/* Used up these attributes */
+	gck_attributes_consume (attrs, n_attrs, CKA_G_DESTRUCT_AFTER,
+	                        CKA_G_DESTRUCT_IDLE, CKA_GNOME_TRANSIENT, G_MAXULONG);
+
 	if (transient) {
 		self->pv->transient = g_slice_new0 (GckObjectTransient);
 		self->pv->transient->timed_after = after;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]