From: Matthias Wachs Date: Wed, 18 Dec 2013 14:12:39 +0000 (+0000) Subject: session timeouts for unix X-Git-Tag: initial-import-from-subversion-38251~5332 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1549d7144c6863c41b958d27e4bee30a84dfa4e6;p=oweals%2Fgnunet.git session timeouts for unix --- diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c index 67c176633..3a2fa6516 100644 --- a/src/transport/plugin_transport_unix.c +++ b/src/transport/plugin_transport_unix.c @@ -911,7 +911,15 @@ unix_plugin_update_session_timeout (void *cls, const struct GNUNET_PeerIdentity *peer, struct Session *session) { + struct Plugin *plugin = cls; + + if (GNUNET_OK != + GNUNET_CONTAINER_multipeermap_contains_value (plugin->session_map, + &session->target, + session)) + return; + reschedule_session_timeout (session); } /** @@ -978,7 +986,7 @@ unix_plugin_send (void *cls, memcpy (&message->sender, plugin->env->my_identity, sizeof (struct GNUNET_PeerIdentity)); memcpy (&message[1], msgbuf, msgbuf_size); - reschedule_session_timeout (session); + wrapper = GNUNET_new (struct UNIXMessageWrapper); wrapper->msg = message; wrapper->msgsize = ssize;