- make api use same window size
authorBart Polot <bart@net.in.tum.de>
Sat, 18 Aug 2012 11:00:23 +0000 (11:00 +0000)
committerBart Polot <bart@net.in.tum.de>
Sat, 18 Aug 2012 11:00:23 +0000 (11:00 +0000)
src/mesh/gnunet-service-mesh.c
src/mesh/mesh.h
src/mesh/mesh_api.c

index e74206e25593fa9f9fa3b88a4e747d994867a3cb..af39707939a1a6bf9ee51b7bc8e2be900db3fb1e 100644 (file)
@@ -60,9 +60,6 @@
 #define MESH_DEBUG_DHT          GNUNET_YES
 #define MESH_DEBUG_CONNECTION   GNUNET_NO
 
-#define INITIAL_WINDOW_SIZE     2
-#define ACK_THRESHOLD           INITIAL_WINDOW_SIZE / 2
-
 #if MESH_DEBUG_CONNECTION
 #define DEBUG_CONN(...) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, __VA_ARGS__)
 #else
index 7a1c594845077d96dc2b22a836aab595e2f5520b..c5b812776c72f5faf255beda8fef24a26e01d6e6 100644 (file)
@@ -29,6 +29,8 @@
 
 #define MESH_DEBUG              GNUNET_YES
 
+#define INITIAL_WINDOW_SIZE     2
+#define ACK_THRESHOLD           INITIAL_WINDOW_SIZE / 2
 
 #include "platform.h"
 #include "gnunet_common.h"
index fe2dff4e50ac8e7bcc17fe1e681a21a7a02a627b..34d11f380a3a3b5af05a3ae6748ca77c083cd749 100644 (file)
@@ -454,7 +454,7 @@ create_tunnel (struct GNUNET_MESH_Handle *h, MESH_TunnelNumber tid)
   {
     t->tid = tid;
   }
-  t->max_send_pid = 0;
+  t->max_send_pid = INITIAL_WINDOW_SIZE - 1;
   t->last_recv_pid = (uint32_t) -1;
   return t;
 }
@@ -837,7 +837,7 @@ do_reconnect (struct GNUNET_MESH_Handle *h)
       continue;
     }
     t->next_send_pid = 0;
-    t->max_send_pid = 0;
+    t->max_send_pid = INITIAL_WINDOW_SIZE - 1;
     t->last_recv_pid = (uint32_t) -1;
     tmsg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE);
     tmsg.header.size = htons (sizeof (struct GNUNET_MESH_TunnelMessage));