diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2011-10-12 16:01:18 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2011-10-12 16:01:18 +0000 |
commit | a00198eb1bc4e9da858d9ac513ebe30ccef941a1 (patch) | |
tree | b9b7f943d7dcab6e0baef3480de0f91ef62bbacc /src/transport | |
parent | b9045bcd76169f111194a13fc4c581b436883556 (diff) | |
download | gnunet-a00198eb1bc4e9da858d9ac513ebe30ccef941a1.tar.gz gnunet-a00198eb1bc4e9da858d9ac513ebe30ccef941a1.zip |
Diffstat (limited to 'src/transport')
-rw-r--r-- | src/transport/plugin_transport_udp.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 606eb45ce..1e0f6e686 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c | |||
@@ -803,9 +803,9 @@ invalidation_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
803 | LOG (GNUNET_ERROR_TYPE_ERROR, | 803 | LOG (GNUNET_ERROR_TYPE_ERROR, |
804 | "Session %X (`%s') is now invalid\n", s, GNUNET_a2s (s->sock_addr,s->addrlen)); | 804 | "Session %X (`%s') is now invalid\n", s, GNUNET_a2s (s->sock_addr,s->addrlen)); |
805 | 805 | ||
806 | // s->plugin->env->session_end(s->plugin->env->cls, &s->target, s); | 806 | s->plugin->env->session_end(s->plugin->env->cls, &s->target, s); |
807 | // GNUNET_assert (GNUNET_YES == GNUNET_CONTAINER_multihashmap_remove(s->plugin->inbound_sessions, &s->target.hashPubKey, s)); | 807 | GNUNET_assert (GNUNET_YES == GNUNET_CONTAINER_multihashmap_remove(s->plugin->inbound_sessions, &s->target.hashPubKey, s)); |
808 | // GNUNET_free (s); | 808 | GNUNET_free (s); |
809 | } | 809 | } |
810 | 810 | ||
811 | 811 | ||
@@ -901,18 +901,16 @@ process_udp_message (struct Plugin *plugin, const struct UDPMessage *msg, | |||
901 | s, | 901 | s, |
902 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE)); | 902 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE)); |
903 | } | 903 | } |
904 | //s->valid_until = GNUNET_TIME_absolute_add(GNUNET_TIME_absolute_get(), GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT); | 904 | s->valid_until = GNUNET_TIME_absolute_add(GNUNET_TIME_absolute_get(), GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT); |
905 | struct GNUNET_TIME_Relative delay = GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 10); | ||
906 | s->valid_until = GNUNET_TIME_absolute_add(GNUNET_TIME_absolute_get(), delay); | ||
907 | if (s->invalidation_task != GNUNET_SCHEDULER_NO_TASK) | 905 | if (s->invalidation_task != GNUNET_SCHEDULER_NO_TASK) |
908 | { | 906 | { |
909 | GNUNET_SCHEDULER_cancel(s->invalidation_task); | 907 | GNUNET_SCHEDULER_cancel(s->invalidation_task); |
910 | s->invalidation_task = GNUNET_SCHEDULER_NO_TASK; | 908 | s->invalidation_task = GNUNET_SCHEDULER_NO_TASK; |
911 | LOG (GNUNET_ERROR_TYPE_ERROR, | 909 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
912 | "Rescheduling %X' `%s'\n", | 910 | "Rescheduling %X' `%s'\n", |
913 | s, udp_address_to_string(NULL, arg, args)); | 911 | s, udp_address_to_string(NULL, arg, args)); |
914 | } | 912 | } |
915 | s->invalidation_task = GNUNET_SCHEDULER_add_delayed(delay, &invalidation_task, s); | 913 | s->invalidation_task = GNUNET_SCHEDULER_add_delayed(GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT, &invalidation_task, s); |
916 | /* iterate over all embedded messages */ | 914 | /* iterate over all embedded messages */ |
917 | si.sender = msg->sender; | 915 | si.sender = msg->sender; |
918 | si.arg = arg; | 916 | si.arg = arg; |