summaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/plugin_transport_udp.c15
-rw-r--r--src/transport/test_transport_api_reliability.c12
-rw-r--r--src/transport/transport.conf.in2
3 files changed, 17 insertions, 12 deletions
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c
index 4eb4b7f36..4fef8e0c6 100644
--- a/src/transport/plugin_transport_udp.c
+++ b/src/transport/plugin_transport_udp.c
@@ -2986,13 +2986,12 @@ remove_timeout_messages_and_select (struct Plugin *plugin,
if (GNUNET_TIME_UNIT_ZERO.rel_value_us == remaining.rel_value_us)
{
/* Message timed out */
- udpw->qc (udpw->qc_cls,
- udpw,
- GNUNET_SYSERR);
- /* Remove message */
removed = GNUNET_YES;
dequeue (plugin,
udpw);
+ udpw->qc (udpw->qc_cls,
+ udpw,
+ GNUNET_SYSERR);
GNUNET_free (udpw);
if (sock == plugin->sockv4)
@@ -3166,11 +3165,11 @@ udp_select_send (struct Plugin *plugin,
else
{
GNUNET_break (0);
+ dequeue (plugin,
+ udpw);
udpw->qc (udpw->qc_cls,
udpw,
GNUNET_SYSERR);
- dequeue (plugin,
- udpw);
notify_session_monitor (plugin,
udpw->session,
GNUNET_TRANSPORT_SS_UPDATE);
@@ -3182,6 +3181,8 @@ udp_select_send (struct Plugin *plugin,
udpw->msg_size,
a,
slen);
+ dequeue (plugin,
+ udpw);
if (GNUNET_SYSERR == sent)
{
/* Failure */
@@ -3226,8 +3227,6 @@ udp_select_send (struct Plugin *plugin,
udpw,
GNUNET_OK);
}
- dequeue (plugin,
- udpw);
notify_session_monitor (plugin,
udpw->session,
GNUNET_TRANSPORT_SS_UPDATE);
diff --git a/src/transport/test_transport_api_reliability.c b/src/transport/test_transport_api_reliability.c
index fcada3e88..e24530008 100644
--- a/src/transport/test_transport_api_reliability.c
+++ b/src/transport/test_transport_api_reliability.c
@@ -31,6 +31,12 @@
#include "gauger.h"
#include "transport-testing.h"
+
+/**
+ * Allow making the problem "bigger".
+ */
+#define FACTOR 10
+
/**
* Total number of messages to send
*
@@ -38,7 +44,7 @@
* 'MAX_PENDING' in 'gnunet-service-transport_clients.c', otherwise
* messages may be dropped even for a reliable transport.
*/
-#define TOTAL_MSGS (1024 * 3)
+#define TOTAL_MSGS (1024 * 3 * FACTOR)
/**
* Message type of test messages
@@ -48,12 +54,12 @@
/**
* Testcase timeout
*/
-#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 90)
+#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 90 * FACTOR)
/**
* How long until we give up on transmitting the message?
*/
-#define TIMEOUT_TRANSMIT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60)
+#define TIMEOUT_TRANSMIT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60 * FACTOR)
/**
diff --git a/src/transport/transport.conf.in b/src/transport/transport.conf.in
index 82effb235..3718f3224 100644
--- a/src/transport/transport.conf.in
+++ b/src/transport/transport.conf.in
@@ -3,7 +3,7 @@ AUTOSTART = @AUTOSTART@
@JAVAPORT@PORT = 2091
HOSTNAME = localhost
BINARY = gnunet-service-transport
-# PREFIX = valgrind
+PREFIX = valgrind
NEIGHBOUR_LIMIT = 50
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;