[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r27853 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r27853 - gnunet/src/mesh |
Date: |
Wed, 10 Jul 2013 01:44:37 +0200 |
Author: bartpolot
Date: 2013-07-10 01:44:37 +0200 (Wed, 10 Jul 2013)
New Revision: 27853
Modified:
gnunet/src/mesh/gnunet-service-mesh.c
Log:
- fix unreliable expected traffic
Modified: gnunet/src/mesh/gnunet-service-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh.c 2013-07-09 23:03:31 UTC (rev
27852)
+++ gnunet/src/mesh/gnunet-service-mesh.c 2013-07-09 23:44:37 UTC (rev
27853)
@@ -2122,6 +2122,10 @@
/* Ok, ACK might be necessary, what PID to ACK? */
ack = t->prev_fc.last_pid_recv + t->queue_max - t->next_fc.queue_n;
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " FWD ACK %u\n", ack);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ " last %u, qmax %u, q %u\n",
+ t->prev_fc.last_pid_recv, t->queue_max, t->next_fc.queue_n);
if (ack == t->prev_fc.last_ack_sent && GNUNET_NO == t->force_ack)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Not sending FWD ACK, not needed\n");
@@ -3655,7 +3659,11 @@
" it's for us! sending to clients...\n");
GNUNET_STATISTICS_update (stats, "# unicast received", 1, GNUNET_NO);
// if (GMC_is_pid_bigger(pid, t->prev_fc.last_pid_recv)) FIXME use
- if (pid == t->prev_fc.last_pid_recv + 1)
+ if ( (GNUNET_NO == t->reliable &&
+ GMC_is_pid_bigger(pid, t->prev_fc.last_pid_recv))
+ ||
+ (GNUNET_YES == t->reliable &&
+ pid == t->prev_fc.last_pid_recv + 1) )
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
" pid %u not seen yet, forwarding\n", pid);
@@ -3757,7 +3765,11 @@
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
" it's for us! sending to clients...\n");
GNUNET_STATISTICS_update (stats, "# to origin received", 1, GNUNET_NO);
- if (pid == t->next_fc.last_pid_recv + 1) // FIXME use "futures" as
accepting
+ if ( (GNUNET_NO == t->reliable &&
+ GMC_is_pid_bigger(pid, t->next_fc.last_pid_recv))
+ ||
+ (GNUNET_YES == t->reliable &&
+ pid == t->next_fc.last_pid_recv + 1) ) // FIXME use "futures" as
accepting
{
t->next_fc.last_pid_recv = pid;
tunnel_send_client_to_orig (t, msg);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r27853 - gnunet/src/mesh,
gnunet <=