aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-12-18 14:18:46 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-12-18 14:18:46 +0000
commit920f6c8c466a11852d1bd7298e3f76deda69b6f3 (patch)
tree402a19dfcdac0a76d3fe953de1bf23a0fe756e2d
parent1549d7144c6863c41b958d27e4bee30a84dfa4e6 (diff)
downloadgnunet-920f6c8c466a11852d1bd7298e3f76deda69b6f3.tar.gz
gnunet-920f6c8c466a11852d1bd7298e3f76deda69b6f3.zip
session time out for http client/server
-rw-r--r--src/transport/plugin_transport_http_client.c9
-rw-r--r--src/transport/plugin_transport_http_server.c6
2 files changed, 11 insertions, 4 deletions
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c
index 504cf48ff..ce493ab4e 100644
--- a/src/transport/plugin_transport_http_client.c
+++ b/src/transport/plugin_transport_http_client.c
@@ -543,7 +543,6 @@ http_client_plugin_send (void *cls,
543 } 543 }
544 544
545 client_schedule (s->plugin, GNUNET_YES); 545 client_schedule (s->plugin, GNUNET_YES);
546 client_reschedule_session_timeout (s);
547 return msgbuf_size; 546 return msgbuf_size;
548} 547}
549 548
@@ -861,8 +860,6 @@ client_send_cb (void *stream, size_t size, size_t nmemb, void *cls)
861 GNUNET_STATISTICS_update (plugin->env->stats, 860 GNUNET_STATISTICS_update (plugin->env->stats,
862 stat_txt, len, GNUNET_NO); 861 stat_txt, len, GNUNET_NO);
863 GNUNET_free (stat_txt); 862 GNUNET_free (stat_txt);
864
865 client_reschedule_session_timeout (s);
866 return len; 863 return len;
867} 864}
868 865
@@ -1764,7 +1761,13 @@ http_client_plugin_update_session_timeout (void *cls,
1764 const struct GNUNET_PeerIdentity *peer, 1761 const struct GNUNET_PeerIdentity *peer,
1765 struct Session *session) 1762 struct Session *session)
1766{ 1763{
1764 struct HTTP_Client_Plugin *plugin = cls;
1765
1766 /* lookup if session is really existing */
1767 if (GNUNET_YES != client_exist_session (plugin, session))
1768 return;
1767 1769
1770 client_reschedule_session_timeout (session);
1768} 1771}
1769 1772
1770/** 1773/**
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c
index 5d529b4ed..f08c7072a 100644
--- a/src/transport/plugin_transport_http_server.c
+++ b/src/transport/plugin_transport_http_server.c
@@ -605,7 +605,6 @@ http_server_plugin_send (void *cls,
605 server_reschedule (session->plugin, 605 server_reschedule (session->plugin,
606 session->server_send->mhd_daemon, 606 session->server_send->mhd_daemon,
607 GNUNET_YES); 607 GNUNET_YES);
608 server_reschedule_session_timeout (session);
609 } 608 }
610 return bytes_sent; 609 return bytes_sent;
611} 610}
@@ -905,7 +904,12 @@ http_server_plugin_update_session_timeout (void *cls,
905 const struct GNUNET_PeerIdentity *peer, 904 const struct GNUNET_PeerIdentity *peer,
906 struct Session *session) 905 struct Session *session)
907{ 906{
907 struct HTTP_Server_Plugin *plugin = cls;
908
909 if (GNUNET_NO == server_exist_session (plugin, session))
910 return;
908 911
912 server_reschedule_session_timeout (session);
909} 913}
910 914
911 915