From d5417c5b080c8fb66b9117adf815dd1953bc012a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 7 Oct 2011 11:37:13 +0000 Subject: [PATCH] stuff --- src/core/gnunet-service-core_kx.c | 8 +++++++- src/core/gnunet-service-core_sessions.c | 8 ++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/core/gnunet-service-core_kx.c b/src/core/gnunet-service-core_kx.c index 9c47174c5..6c9e9437a 100644 --- a/src/core/gnunet-service-core_kx.c +++ b/src/core/gnunet-service-core_kx.c @@ -899,7 +899,9 @@ GSC_KX_handle_ping (struct GSC_KeyExchangeInfo *kx, return; } /* construct PONG */ - tx.inbound_bw_limit = kx->bw_in; // FIXME! + tx.inbound_bw_limit = GNUNET_CONSTANTS_DEFAULT_BW_IN_OUT; + /* FIXME: here we should ideally ask ATS about unassigned bandwidth and fill in + a value based on that; using the minimum here results in a rather slow start... */ tx.challenge = t.challenge; tx.target = t.target; tp.header.type = htons (GNUNET_MESSAGE_TYPE_CORE_PONG); @@ -1122,9 +1124,13 @@ GSC_KX_handle_pong (struct GSC_KeyExchangeInfo *kx, const struct GNUNET_MessageH kx->retry_set_key_task = GNUNET_SCHEDULER_NO_TASK; GNUNET_assert (kx->keep_alive_task == GNUNET_SCHEDULER_NO_TASK); update_timeout (kx); + GSC_SESSIONS_update (&kx->peer, + t.inbound_bw_limit); break; case KX_STATE_UP: update_timeout (kx); + GSC_SESSIONS_update (&kx->peer, + t.inbound_bw_limit); break; default: GNUNET_break (0); diff --git a/src/core/gnunet-service-core_sessions.c b/src/core/gnunet-service-core_sessions.c index e97954438..0d1fec2dd 100644 --- a/src/core/gnunet-service-core_sessions.c +++ b/src/core/gnunet-service-core_sessions.c @@ -24,10 +24,10 @@ * @author Christian Grothoff */ #include "platform.h" -#include "gnunet_service_core.h" -#include "gnunet_service_core_neighbours.h" -#include "gnunet_service_core_kx.h" -#include "gnunet_service_core_sessions.h" +#include "gnunet-service-core.h" +#include "gnunet-service-core_neighbours.h" +#include "gnunet-service-core_kx.h" +#include "gnunet-service-core_sessions.h" /** * Record kept for each request for transmission issued by a -- 2.25.1