gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] branch master updated: -fix neighbour send


From: gnunet
Subject: [gnunet] branch master updated: -fix neighbour send
Date: Wed, 24 Feb 2021 11:26:48 +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 e7b2f86d3 -fix neighbour send
e7b2f86d3 is described below

commit e7b2f86d362dca94c03b50e9a9f1ec9220de9b21
Author: Martin Schanzenbach <mschanzenbach@posteo.de>
AuthorDate: Wed Feb 24 11:25:28 2021 +0100

    -fix neighbour send
---
 src/transport/gnunet-service-tng.c | 18 +++++++++---------
 src/transport/transport-testing2.c |  5 +++++
 2 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/src/transport/gnunet-service-tng.c 
b/src/transport/gnunet-service-tng.c
index bfa5ca772..a4c7f0517 100644
--- a/src/transport/gnunet-service-tng.c
+++ b/src/transport/gnunet-service-tng.c
@@ -4230,7 +4230,7 @@ route_via_neighbour (const struct Neighbour *n,
   for (struct Queue *pos = n->queue_head; NULL != pos;
        pos = pos->next_neighbour)
   {
-    if ((0 == (options & RMO_UNCONFIRMED_ALLOWED)) ||
+    if ((0 != (options & RMO_UNCONFIRMED_ALLOWED)) ||
         (pos->validated_until.abs_value_us > now.abs_value_us))
       candidates++;
   }
@@ -4259,7 +4259,7 @@ route_via_neighbour (const struct Neighbour *n,
   for (struct Queue *pos = n->queue_head; NULL != pos;
        pos = pos->next_neighbour)
   {
-    if ((0 == (options & RMO_UNCONFIRMED_ALLOWED)) ||
+    if ((0 != (options & RMO_UNCONFIRMED_ALLOWED)) ||
         (pos->validated_until.abs_value_us > now.abs_value_us))
     {
       if ((sel1 == candidates) || (sel2 == candidates))
@@ -7696,8 +7696,6 @@ handle_hello_for_incoming (void *cls,
 }
 
 
-
-
 /**
  * Communicator gave us a transport address validation challenge.  Process the
  * request.
@@ -7761,12 +7759,15 @@ handle_validation_challenge (
     route_control_message_without_fc (&cmc->im.sender,
                                       &tvr.header,
                                       RMO_ANYTHING_GOES | RMO_REDUNDANT);
-  } else {
+  }
+  else
+  {
     /* Use route via neighbour */
     n = lookup_neighbour (&sender);
     if (NULL != n)
       route_via_neighbour (n, &tvr.header,
-                           RMO_ANYTHING_GOES | RMO_REDUNDANT);
+                           RMO_ANYTHING_GOES | RMO_REDUNDANT
+                           | RMO_UNCONFIRMED_ALLOWED);
   }
 
   finish_cmc_handling (cmc);
@@ -8992,8 +8993,8 @@ handle_send_message_ack (void *cls,
     if (0 != GNUNET_memcmp (&queue->neighbour->pid, &sma->receiver))
       continue;
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Found PID %s\n",
-              GNUNET_i2s (&queue->neighbour->pid));
+                "Found PID %s\n",
+                GNUNET_i2s (&queue->neighbour->pid));
 
 
     for (struct QueueEntry *qep = queue->queue_head; NULL != qep;
@@ -9667,7 +9668,6 @@ handle_update_queue_message (void *cls,
 }
 
 
-
 /**
  * Communicator tells us that our request to create a queue "worked", that
  * is setting up the queue is now in process.
diff --git a/src/transport/transport-testing2.c 
b/src/transport/transport-testing2.c
index 23173e763..513b030b8 100644
--- a/src/transport/transport-testing2.c
+++ b/src/transport/transport-testing2.c
@@ -696,6 +696,11 @@ GNUNET_TRANSPORT_TESTING_stop_peer (struct
     GNUNET_ATS_connectivity_done (p->ats);
     p->ats = NULL;
   }
+  if (NULL != p->ph)
+  {
+    GNUNET_PEERSTORE_disconnect (p->ph, GNUNET_NO);
+    p->ph = NULL;
+  }
   if (NULL != p->hello)
   {
     GNUNET_free (p->hello);

-- 
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]