void
GNUNET_SERVER_receive_done (struct GNUNET_SERVER_Client *client, int success);
+/**
+ * Disable the warning the server issues if a message is not acknowledged
+ * in a timely fashion. Use this call if a client is intentionally delayed
+ * for a while. Only applies to the current message.
+ *
+ * @param client client for which to disable the warning
+ */
+void
+GNUNET_SERVER_disable_receive_done_warning (struct GNUNET_SERVER_Client *client);
+
/**
* Inject a message into the server, pretend it came
ret = GNUNET_BANDWIDTH_tracker_get_delay (&n->in_tracker, 0);
if (ret.rel_value > 0)
{
-#if DEBUG_TRANSPORT || 1
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+#if DEBUG_TRANSPORT
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Throttling read (%llu bytes excess at %u b/s), waiting %llu ms before reading more.\n",
(unsigned long long) n->in_tracker.consumption_since_last_update__,
(unsigned int) n->in_tracker.available_bytes_per_s__,
GNUNET_NO);
return;
}
-#if DEBUG_TRANSPORT
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+#if DEBUG_TRANSPORT || 1
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"Received `%s' request (new quota %u, old quota %u) from client for peer `%4s'\n",
"SET_QUOTA",
(unsigned int) ntohl (qsm->quota.value__),
}
else
{
-#if DEBUG_TCP || 1
- GNUNET_log_from (GNUNET_ERROR_TYPE_INFO,
+#if DEBUG_TCP
+ GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG,
"tcp",
"Throttling receiving from `%s' for %llu ms\n",
GNUNET_i2s (&session->target),
(unsigned long long) delay.rel_value);
#endif
+ GNUNET_SERVER_disable_receive_done_warning (client);
session->receive_delay_task =
GNUNET_SCHEDULER_add_delayed (delay, &delayed_done, session);
}
}
+/**
+ * Disable the warning the server issues if a message is not acknowledged
+ * in a timely fashion. Use this call if a client is intentionally delayed
+ * for a while. Only applies to the current message.
+ *
+ * @param client client for which to disable the warning
+ */
+void
+GNUNET_SERVER_disable_receive_done_warning (struct GNUNET_SERVER_Client *client)
+{
+ if (GNUNET_SCHEDULER_NO_TASK != client->warn_task)
+ {
+ GNUNET_SCHEDULER_cancel (client->warn_task);
+ client->warn_task = GNUNET_SCHEDULER_NO_TASK;
+ }
+}
+
+
/**
* Inject a message into the server, pretend it came
* from the specified client. Delivery of the message