From 1549d7144c6863c41b958d27e4bee30a84dfa4e6 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Wed, 18 Dec 2013 14:12:39 +0000 Subject: [PATCH] session timeouts for unix --- src/transport/plugin_transport_unix.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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; -- 2.25.1