small API change: do no longer pass rarely needed GNUNET_SCHEDULER_TaskContext to...
[oweals/gnunet.git] / src / cadet / cadet_path.c
index 1ea2b185fe88b7c9a0610e452a931035e60dd5a8..47241292bc14ed6ae8850583b775390210467b73 100644 (file)
  * Removes the path from the peer (except for direct paths).
  *
  * @param cls Closure (path to destroy).
- * @param tc Task context.
  */
 static void
-path_destroy_delayed (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+path_destroy_delayed (void *cls)
 {
   struct CadetPeerPath *path = cls;
   struct CadetPeer *peer;
+  const struct GNUNET_SCHEDULER_TaskContext *tc;
 
   LOG (GNUNET_ERROR_TYPE_INFO, "Destroy delayed %p (%u)\n", path, path->length);
   path->path_delete = NULL;
 
   /* During shutdown, the peers peermap might not exist anymore. */
+  tc = GNUNET_SCHEDULER_get_task_context ();
   if ((GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason) == 0)
   {
     if (2 >= path->length)