gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] branch master updated: transport: add a couple of comments to T


From: gnunet
Subject: [gnunet] branch master updated: transport: add a couple of comments to TCP communicator/service
Date: Sun, 10 Mar 2024 11:31:25 +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 bedcdf2db transport: add a couple of comments to TCP 
communicator/service
bedcdf2db is described below

commit bedcdf2dbf63590dd128f3670763d3e9f2c749e5
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Sun Mar 10 11:31:19 2024 +0100

    transport: add a couple of comments to TCP communicator/service
---
 contrib/handbook                                 |  2 +-
 src/service/transport/gnunet-communicator-tcp.c  | 12 +++++++-----
 src/service/transport/gnunet-service-transport.c |  6 +-----
 3 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/contrib/handbook b/contrib/handbook
index f88a38942..f9368db2b 160000
--- a/contrib/handbook
+++ b/contrib/handbook
@@ -1 +1 @@
-Subproject commit f88a389426a665df222486b0563e5a91e77a7045
+Subproject commit f9368db2bf8ce9eb6a9e951891142309c9c898d4
diff --git a/src/service/transport/gnunet-communicator-tcp.c 
b/src/service/transport/gnunet-communicator-tcp.c
index b08b571d1..bb6c10166 100644
--- a/src/service/transport/gnunet-communicator-tcp.c
+++ b/src/service/transport/gnunet-communicator-tcp.c
@@ -1321,6 +1321,7 @@ rekey_monotime_cb (void *cls,
     GNUNET_break (0);
     GNUNET_PEERSTORE_iteration_stop (queue->rekey_monotime_get);
     queue->rekey_monotime_get = NULL;
+    // FIXME: Why should we try to gracefully finish here??
     queue_finish (queue);
     return;
   }
@@ -1402,6 +1403,7 @@ do_rekey (struct Queue *queue, const struct TCPRekey 
*rekey)
         &queue->target.public_key))
   {
     GNUNET_break (0);
+    // FIXME Why should we try to gracefully finish here?
     queue_finish (queue);
     return;
   }
@@ -1483,6 +1485,7 @@ handshake_ack_monotime_cb (void *cls,
     GNUNET_break (0);
     GNUNET_PEERSTORE_iteration_stop (queue->handshake_ack_monotime_get);
     queue->handshake_ack_monotime_get = NULL;
+    // FIXME: Why should we try to gracefully finish here?
     queue_finish (queue);
     return;
   }
@@ -1908,8 +1911,7 @@ try_handle_plaintext (struct Queue *queue)
     if (sizeof(*tca) > queue->pread_off)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                  "Handling plaintext size of tca greater than pread 
offset.\n")
-      ;
+                  "Handling plaintext size of tca greater than pread 
offset.\n");
       return 0;
     }
     if (ntohs (hdr->size) != sizeof(*tca))
@@ -2123,7 +2125,7 @@ queue_read (void *cls)
     if ((EAGAIN != errno) && (EINTR != errno))
     {
       GNUNET_log_strerror (GNUNET_ERROR_TYPE_DEBUG, "recv");
-      queue_finish (queue);
+      queue_destroy (queue);
       return;
     }
     /* try again */
@@ -2140,7 +2142,7 @@ queue_read (void *cls)
                 GNUNET_STRINGS_relative_time_to_string (
                   GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT,
                   GNUNET_YES));
-    queue_finish (queue);
+    queue_destroy (queue);
     return;
   }
   if (0 == rcvd)
@@ -2222,7 +2224,7 @@ queue_read (void *cls)
               GNUNET_STRINGS_relative_time_to_string (
                 GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT,
                 GNUNET_YES));
-  queue_finish (queue);
+  queue_destroy (queue);
 }
 
 
diff --git a/src/service/transport/gnunet-service-transport.c 
b/src/service/transport/gnunet-service-transport.c
index 344f46f1e..ca191d49d 100644
--- a/src/service/transport/gnunet-service-transport.c
+++ b/src/service/transport/gnunet-service-transport.c
@@ -3898,8 +3898,7 @@ free_queue (struct Queue *queue)
                                 tc->details.communicator.queue_tail,
                                 queue);
   maxxed = (COMMUNICATOR_TOTAL_QUEUE_LIMIT <=
-            tc->details.communicator.
-            total_queue_length);
+            tc->details.communicator.total_queue_length);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Cleaning up queue with length %u\n",
               queue->queue_length);
@@ -3915,9 +3914,6 @@ free_queue (struct Queue *queue)
     }
     GNUNET_free (qe);
   }
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Cleaning up queue with length %u\n",
-              queue->queue_length);
   GNUNET_assert (0 == queue->queue_length);
   if ((maxxed) && (COMMUNICATOR_TOTAL_QUEUE_LIMIT >
                    tc->details.communicator.total_queue_length))

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