gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] 01/03: remove speed bumps


From: gnunet
Subject: [GNUnet-SVN] [gnunet] 01/03: remove speed bumps
Date: Mon, 01 Jan 2018 15:30:07 +0100

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

grothoff pushed a commit to branch master
in repository gnunet.

commit 4b766fd267ca83a8faa4e22353d5942074d6f2b7
Author: Christian Grothoff <address@hidden>
AuthorDate: Mon Jan 1 15:22:07 2018 +0100

    remove speed bumps
---
 src/cadet/test_cadet.c                  | 16 ++++++++++++----
 src/core/gnunet-service-core_sessions.c | 18 ++++--------------
 2 files changed, 16 insertions(+), 18 deletions(-)

diff --git a/src/cadet/test_cadet.c b/src/cadet/test_cadet.c
index 6691a0573..bc4414054 100644
--- a/src/cadet/test_cadet.c
+++ b/src/cadet/test_cadet.c
@@ -58,6 +58,11 @@ struct CadetTestChannelWrapper
 #define SHORT_TIME GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 20)
 
 /**
+ * How fast do we send messages?
+ */
+#define SEND_INTERVAL GNUNET_TIME_relative_multiply 
(GNUNET_TIME_UNIT_MILLISECONDS, 10)
+
+/**
  * DIFFERENT TESTS TO RUN
  */
 #define SETUP 0
@@ -525,6 +530,7 @@ send_test_message (struct GNUNET_CADET_Channel *channel)
   GNUNET_MQ_send (GNUNET_CADET_get_mq (channel), env);
 }
 
+
 /**
  * Task to request a new data transmission in a SPEED test, without waiting
  * for previous messages to be sent/arrrive.
@@ -537,7 +543,9 @@ send_next_msg (void *cls)
   struct GNUNET_CADET_Channel *channel;
 
   send_next_msg_task = NULL;
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending next message: %d\n", 
data_sent);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Sending next message: %d\n",
+             data_sent);
 
   channel = GNUNET_YES == test_backwards ? incoming_ch : outgoing_ch;
   GNUNET_assert (NULL != channel);
@@ -550,9 +558,9 @@ send_next_msg (void *cls)
                 "Scheduling message %d\n",
                 data_sent + 1);
     send_next_msg_task =
-        GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_UNIT_SECONDS,
-                                     &send_next_msg,
-                                     NULL);
+      GNUNET_SCHEDULER_add_delayed (SEND_INTERVAL,
+                                     &send_next_msg,
+                                     NULL);
   }
 }
 
diff --git a/src/core/gnunet-service-core_sessions.c 
b/src/core/gnunet-service-core_sessions.c
index 5d34b7c26..973ef9c2f 100644
--- a/src/core/gnunet-service-core_sessions.c
+++ b/src/core/gnunet-service-core_sessions.c
@@ -147,12 +147,6 @@ struct Session
   struct GNUNET_TIME_Relative typemap_delay;
 
   /**
-   * Is the neighbour queue empty and thus ready for us
-   * to transmit an encrypted message?
-   */
-  int ready_to_transmit;
-
-  /**
    * Is this the first time we're sending the typemap? If so,
    * we want to send it a bit faster the second time.  0 if
    * we are sending for the first time, 1 if not.
@@ -641,13 +635,7 @@ try_transmission (struct Session *session)
   enum GNUNET_CORE_Priority maxpc;
   struct GSC_ClientActiveRequest *car;
   int excess;
-
-  if (GNUNET_YES != session->ready_to_transmit)
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                "Not yet ready to transmit, not evaluating queue\n");
-    return;
-  }
+  
   msize = 0;
   min_deadline = GNUNET_TIME_UNIT_FOREVER_ABS;
   /* if the peer has excess bandwidth, background traffic is allowed,
@@ -888,10 +876,12 @@ GSC_SESSIONS_solicit (const struct GNUNET_PeerIdentity 
*pid)
 {
   struct Session *session;
 
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Transport solicits for %s\n",
+             GNUNET_i2s (pid));
   session = find_session (pid);
   if (NULL == session)
     return;
-  session->ready_to_transmit = GNUNET_YES;
   try_transmission (session);
 }
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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