-lockmanager acquire retry
[oweals/gnunet.git] / src / lockmanager / gnunet-service-lockmanager.c
index 18a5202a267d9b45e2fac6062d10779897973407..b5126ba20e748417b6a7aa1c59f52f5df11ec27d 100644 (file)
@@ -229,7 +229,7 @@ get_key (const char *domain_name,
  *         GNUNET_NO if not. 
  */
 static int
-match_iterator (void *cls, const GNUNET_HashCode *key, void *value)
+match_iterator (void *cls, const struct GNUNET_HashCode *key, void *value)
 {
   struct LockMatch *match = cls;
   struct Lock *lock = value;
@@ -772,6 +772,7 @@ client_disconnect_cb (void *cls, struct GNUNET_SERVER_Client *client)
 {
   struct ClientList *cl_entry;
   struct LockList *ll_entry;
+  struct Lock *lock;
 
   if (NULL == client)
     return;
@@ -782,8 +783,9 @@ client_disconnect_cb (void *cls, struct GNUNET_SERVER_Client *client)
     return;
   while (NULL != (ll_entry = cl_entry->ll_head))
   {
-    process_lock_release (ll_entry->lock);
+    lock = ll_entry->lock;
     cl_ll_remove_lock (cl_entry, ll_entry);
+    process_lock_release (lock);
   }
   cl_remove_client (cl_entry);
 }
@@ -801,7 +803,7 @@ client_disconnect_cb (void *cls, struct GNUNET_SERVER_Client *client)
  */
 static int 
 lock_delete_iterator (void *cls,
-                      const GNUNET_HashCode * key,
+                      const struct GNUNET_HashCode * key,
                       void *value)
 {
   struct Lock *lock = value;
@@ -824,8 +826,8 @@ lock_delete_iterator (void *cls,
 /**
  * Task to clean up and shutdown nicely
  *
- * @param 
- * @return 
+ * @param cls NULL
+ * @param tc the TaskContext from scheduler
  */
 static void
 shutdown_task (void *cls,