[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: transport: condition always true. simpli
From: |
gnunet |
Subject: |
[gnunet] branch master updated: transport: condition always true. simplified code. |
Date: |
Thu, 28 Nov 2024 09:08:35 +0100 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 40d1433b8 transport: condition always true. simplified code.
40d1433b8 is described below
commit 40d1433b8abc71eabc063b2c9be3c1f7562e865b
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Thu Nov 28 09:08:28 2024 +0100
transport: condition always true. simplified code.
---
src/service/transport/gnunet-service-transport.c | 51 +++++++++++-------------
1 file changed, 24 insertions(+), 27 deletions(-)
diff --git a/src/service/transport/gnunet-service-transport.c
b/src/service/transport/gnunet-service-transport.c
index c36553aa7..6e3bfe9ad 100644
--- a/src/service/transport/gnunet-service-transport.c
+++ b/src/service/transport/gnunet-service-transport.c
@@ -3572,41 +3572,38 @@ static void
free_dv_route (struct DistanceVector *dv)
{
struct DistanceVectorHop *dvh;
+ struct VirtualLink *vl;
while (NULL != (dvh = dv->dv_head))
free_distance_vector_hop (dvh);
- if (NULL == dv->dv_head)
- {
- struct VirtualLink *vl;
- GNUNET_assert (
- GNUNET_YES ==
- GNUNET_CONTAINER_multipeermap_remove (dv_routes, &dv->target, dv));
- if (NULL != (vl = dv->vl))
+ GNUNET_assert (
+ GNUNET_YES ==
+ GNUNET_CONTAINER_multipeermap_remove (dv_routes, &dv->target, dv));
+ if (NULL != (vl = dv->vl))
+ {
+ GNUNET_assert (dv == vl->dv);
+ vl->dv = NULL;
+ if (NULL == vl->n)
{
- GNUNET_assert (dv == vl->dv);
- vl->dv = NULL;
- if (NULL == vl->n)
- {
- cores_send_disconnect_info (&dv->target);
- free_virtual_link (vl);
- }
- else
- {
- GNUNET_SCHEDULER_cancel (vl->visibility_task);
- vl->visibility_task = GNUNET_SCHEDULER_add_now (&check_link_down, vl);
- }
- dv->vl = NULL;
+ cores_send_disconnect_info (&dv->target);
+ free_virtual_link (vl);
}
-
- if (NULL != dv->timeout_task)
+ else
{
- GNUNET_SCHEDULER_cancel (dv->timeout_task);
- dv->timeout_task = NULL;
+ GNUNET_SCHEDULER_cancel (vl->visibility_task);
+ vl->visibility_task = GNUNET_SCHEDULER_add_now (&check_link_down, vl);
}
- GNUNET_free (dv->km);
- GNUNET_free (dv);
+ dv->vl = NULL;
+ }
+
+ if (NULL != dv->timeout_task)
+ {
+ GNUNET_SCHEDULER_cancel (dv->timeout_task);
+ dv->timeout_task = NULL;
}
+ GNUNET_free (dv->km);
+ GNUNET_free (dv);
}
@@ -13064,7 +13061,7 @@ run (void *cls,
* Define "main" method using service macro.
*/
GNUNET_SERVICE_MAIN (
- GNUNET_OS_project_data_gnunet(),
+ GNUNET_OS_project_data_gnunet (),
"transport",
GNUNET_SERVICE_OPTION_SOFT_SHUTDOWN,
&run,
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: transport: condition always true. simplified code.,
gnunet <=