- fix
authorSree Harsha Totakura <totakura@in.tum.de>
Fri, 15 Mar 2013 10:35:35 +0000 (10:35 +0000)
committerSree Harsha Totakura <totakura@in.tum.de>
Fri, 15 Mar 2013 10:35:35 +0000 (10:35 +0000)
src/testbed/gnunet-service-testbed_cache.c

index 4d86bc41ad8c5afd76e6c77ebac085d83afc644a..9fc97c836e3dd8ce24f85a2978587a41a3c45bb2 100644 (file)
@@ -783,7 +783,10 @@ cache_get_handle (unsigned int peer_id, struct GSTCacheGetHandle *cgh,
   if (NULL != handle)
   {
     if (GNUNET_SCHEDULER_NO_TASK == entry->notify_task)
-      entry->notify_task = GNUNET_SCHEDULER_add_now (&call_cgh_cb, entry);
+    {
+      if (NULL != search_suitable_cgh (entry, entry->cgh->qhead))
+        entry->notify_task = GNUNET_SCHEDULER_add_now (&call_cgh_cb, entry);
+    }
     return cgh;
   }
   switch (cgh->type)