gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] branch master updated: transport: cleanup virtual links on shut


From: gnunet
Subject: [gnunet] branch master updated: transport: cleanup virtual links on shutdown bypassing visibility tasks
Date: Wed, 02 Oct 2024 23:49:47 +0200

This is an automated email from the git hooks/post-receive script.

thejackimonster pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new d384ca1cb transport: cleanup virtual links on shutdown bypassing 
visibility tasks
d384ca1cb is described below

commit d384ca1cb91f1f3482b28f576bd91e9c85ecf6b6
Author: Jacki <jacki@thejackimonster.de>
AuthorDate: Wed Oct 2 23:49:33 2024 +0200

    transport: cleanup virtual links on shutdown bypassing visibility tasks
    
    Signed-off-by: Jacki <jacki@thejackimonster.de>
---
 src/service/transport/gnunet-service-transport.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/service/transport/gnunet-service-transport.c 
b/src/service/transport/gnunet-service-transport.c
index e8cbf9ff3..bedd3fd4a 100644
--- a/src/service/transport/gnunet-service-transport.c
+++ b/src/service/transport/gnunet-service-transport.c
@@ -3727,9 +3727,11 @@ remove_global_addresses (void *cls,
  * Release memory used by @a neighbour.
  *
  * @param neighbour neighbour entry to free
+ * @param drop_link flag to decide whether to drop its virtual link
  */
 static void
-free_neighbour (struct Neighbour *neighbour)
+free_neighbour (struct Neighbour *neighbour,
+                enum GNUNET_GenericReturnValue drop_link)
 {
   struct DistanceVectorHop *dvh;
   struct VirtualLink *vl;
@@ -3769,7 +3771,7 @@ free_neighbour (struct Neighbour *neighbour)
   {
     GNUNET_assert (neighbour == vl->n);
     vl->n = NULL;
-    if (NULL == vl->dv)
+    if ((GNUNET_YES == drop_link) || (NULL == vl->dv))
     {
       cores_send_disconnect_info (&vl->target);
       free_virtual_link (vl);
@@ -4082,7 +4084,7 @@ free_queue (struct Queue *queue)
   }
   if (NULL == neighbour->queue_head)
   {
-    free_neighbour (neighbour);
+    free_neighbour (neighbour, GNUNET_NO);
   }
 }
 
@@ -12772,7 +12774,7 @@ free_neighbour_cb (void *cls,
   (void) cls;
   (void) pid;
   GNUNET_break (0);  // should this ever happen?
-  free_neighbour (neighbour);
+  free_neighbour (neighbour, GNUNET_YES);
 
   return GNUNET_OK;
 }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]