comment
authorChristian Grothoff <christian@grothoff.org>
Sat, 27 Feb 2010 12:21:45 +0000 (12:21 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sat, 27 Feb 2010 12:21:45 +0000 (12:21 +0000)
src/fs/fs_test_lib_data.conf
src/fs/test_fs_download_data.conf
src/transport/plugin_transport_tcp.c

index 23cb948c440d92a95aaad3d3389473df0e3f21ee..d62ee8c983b86b3db080ac3caaa9203b6cce9735 100644 (file)
@@ -12,7 +12,7 @@ HOSTNAME = localhost
 [transport]
 PORT = 43465
 PLUGINS = tcp
-#DEBUG = YES
+DEBUG = YES
 
 [arm]
 PORT = 43466
@@ -40,7 +40,7 @@ PORT = 43470
 HOSTNAME = localhost
 #TOTAL_QUOTA_IN = 3932160
 #TOTAL_QUOTA_OUT = 3932160
-#DEBUG = YES
+DEBUG = YES
 
 [fs]
 PORT = 43471
index 6c14de879f977ffc1c3ae833a09c923fc0dd10b1..e4aa966d5f53aca2ec46fe4e4e6a23634bc32c90 100644 (file)
@@ -36,7 +36,7 @@ HOSTNAME = localhost
 [fs]
 PORT = 42471
 HOSTNAME = localhost
-DEBUG = YES
+#DEBUG = YES
 #PREFIX = valgrind --tool=memcheck --leak-check=yes
 #BINARY = /home/grothoff/bin/gnunet-service-fs
 
index 885dbe22beeb877a607992eeccc96f46bf8410f1..98a5f1638dc67959b74ce6716b8e70ec35010a18 100644 (file)
@@ -333,6 +333,7 @@ create_session (struct Plugin *plugin,
   ret->client = client;
   ret->target = *target;
   ret->last_quota_update = GNUNET_TIME_absolute_get ();
+  // FIXME: This is simply wrong...
   ret->quota_in = plugin->env->default_quota_in;
   ret->expecting_welcome = GNUNET_YES;
   pm = GNUNET_malloc (sizeof (struct PendingMessage) + sizeof (struct WelcomeMessage));
@@ -902,6 +903,15 @@ tcp_plugin_set_receive_quota (void *cls,
   struct Plugin *plugin = cls;
   struct Session *session;
 
+  // FIXME: This is simply wrong:
+  // We may have multiple sessions for the target,
+  // and some OTHER session might be the one to 
+  // survive; not to mention the inbound-quota should
+  // be enforced across transports!
+  // => keep quota-related states in the service (globally, per peer)
+  //    and update/query the information when it is needed!
+  // => we can likely get rid of this entire function and
+  //    replace it with a query/update API!
   session = find_session_by_target (plugin, target);
   if (session == NULL)
     {