From: Christian Grothoff Date: Sat, 27 Feb 2010 12:21:45 +0000 (+0000) Subject: comment X-Git-Tag: initial-import-from-subversion-38251~22594 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d996714222558d6d2b3f590f9c4dda9d872d913c;p=oweals%2Fgnunet.git comment --- diff --git a/src/fs/fs_test_lib_data.conf b/src/fs/fs_test_lib_data.conf index 23cb948c4..d62ee8c98 100644 --- a/src/fs/fs_test_lib_data.conf +++ b/src/fs/fs_test_lib_data.conf @@ -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 diff --git a/src/fs/test_fs_download_data.conf b/src/fs/test_fs_download_data.conf index 6c14de879..e4aa966d5 100644 --- a/src/fs/test_fs_download_data.conf +++ b/src/fs/test_fs_download_data.conf @@ -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 diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index 885dbe22b..98a5f1638 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c @@ -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) {