remove speed bumps
authorChristian Grothoff <christian@grothoff.org>
Mon, 1 Jan 2018 14:22:07 +0000 (15:22 +0100)
committerChristian Grothoff <christian@grothoff.org>
Mon, 1 Jan 2018 14:30:04 +0000 (15:30 +0100)
src/cadet/test_cadet.c
src/core/gnunet-service-core_sessions.c

index 6691a057331c49eebd7c4a601ef5ca84b5abbabe..bc441405401cf8d8c8dfcd7d237d2716808804a1 100644 (file)
@@ -57,6 +57,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
  */
@@ -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);
   }
 }
 
index 5d34b7c26cef80aec017edb781d83c354f3124f4..973ef9c2faaa7d5592efa9c6df1e4ce478aed866 100644 (file)
@@ -146,12 +146,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
@@ -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);
 }