[Opendnssec-commits] [keihatsu.kirei.se/svn/dnssec] r3820 - trunk/OpenDNSSEC/signer/src/scheduler

Matthijs Mekking matthijs at nlnetlabs.nl
Fri Aug 27 11:55:51 CEST 2010


Author: matthijs
Date: 2010-08-27 11:55:50 +0200 (Fri, 27 Aug 2010)
New Revision: 3820

Modified:
   trunk/OpenDNSSEC/signer/src/scheduler/task.c
Log:
own memory for task key (could be related to pivotal 4660167: task not removed from queue)

Modified: trunk/OpenDNSSEC/signer/src/scheduler/task.c
===================================================================
--- trunk/OpenDNSSEC/signer/src/scheduler/task.c	2010-08-27 09:35:39 UTC (rev 3819)
+++ trunk/OpenDNSSEC/signer/src/scheduler/task.c	2010-08-27 09:55:50 UTC (rev 3820)
@@ -293,6 +293,8 @@
             while (node != LDNS_RBTREE_NULL) {
                 task = (task_type*) node->key;
                 task_cleanup(task);
+                task = (task_type*) node->data;
+                task_cleanup(task);
                 node = ldns_rbtree_next(node);
             }
             se_rbnode_free(list->tasks->root);
@@ -316,7 +318,10 @@
 task2node(task_type* task)
 {
     ldns_rbnode_t* node = (ldns_rbnode_t*) se_malloc(sizeof(ldns_rbnode_t));
-    node->key = task;
+    task_type* task_key = task_create(task->what, task->when, task->who, task->zone);
+    task_key->backoff = task->backoff;
+    task_key->flush = task->flush;
+    node->key = task_key;
     node->data = task;
     return node;
 }




More information about the Opendnssec-commits mailing list