From: Bart Polot Date: Sat, 18 Aug 2012 11:00:23 +0000 (+0000) Subject: - make api use same window size X-Git-Tag: initial-import-from-subversion-38251~12169 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=44d20b3ef4e28a1210dcb94a06b0c278fca6bb17;p=oweals%2Fgnunet.git - make api use same window size --- diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index e74206e25..af3970793 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c @@ -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 diff --git a/src/mesh/mesh.h b/src/mesh/mesh.h index 7a1c59484..c5b812776 100644 --- a/src/mesh/mesh.h +++ b/src/mesh/mesh.h @@ -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" diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c index fe2dff4e5..34d11f380 100644 --- a/src/mesh/mesh_api.c +++ b/src/mesh/mesh_api.c @@ -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));