stuff
authorChristian Grothoff <christian@grothoff.org>
Fri, 7 Oct 2011 11:37:13 +0000 (11:37 +0000)
committerChristian Grothoff <christian@grothoff.org>
Fri, 7 Oct 2011 11:37:13 +0000 (11:37 +0000)
src/core/gnunet-service-core_kx.c
src/core/gnunet-service-core_sessions.c

index 9c47174c53193700c8d46b430d0aec469d85f39c..6c9e9437ac63e6266749ac11ff37585ca5326ff5 100644 (file)
@@ -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);
index e97954438229ca2591e304f5b8cb3b59bcf91fc6..0d1fec2dd89ffb06c6bd01130a273d32a17580aa 100644 (file)
  * @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