diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/transport/plugin_transport_http_client.c | 10 | ||||
-rw-r--r-- | src/transport/plugin_transport_http_common.h | 6 | ||||
-rw-r--r-- | src/transport/plugin_transport_http_server.c | 14 |
3 files changed, 15 insertions, 15 deletions
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c index 79c34c641..ba125aaaa 100644 --- a/src/transport/plugin_transport_http_client.c +++ b/src/transport/plugin_transport_http_client.c | |||
@@ -1603,7 +1603,7 @@ client_session_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc | |||
1603 | GNUNET_log (TIMEOUT_LOG, | 1603 | GNUNET_log (TIMEOUT_LOG, |
1604 | "Session %p was idle for %s, disconnecting\n", | 1604 | "Session %p was idle for %s, disconnecting\n", |
1605 | s, | 1605 | s, |
1606 | GNUNET_STRINGS_relative_time_to_string (CLIENT_SESSION_TIMEOUT, | 1606 | GNUNET_STRINGS_relative_time_to_string (HTTP_CLIENT_SESSION_TIMEOUT, |
1607 | GNUNET_YES)); | 1607 | GNUNET_YES)); |
1608 | 1608 | ||
1609 | /* call session destroy function */ | 1609 | /* call session destroy function */ |
@@ -1622,13 +1622,13 @@ client_start_session_timeout (struct Session *s) | |||
1622 | 1622 | ||
1623 | GNUNET_assert (NULL != s); | 1623 | GNUNET_assert (NULL != s); |
1624 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == s->timeout_task); | 1624 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == s->timeout_task); |
1625 | s->timeout_task = GNUNET_SCHEDULER_add_delayed (CLIENT_SESSION_TIMEOUT, | 1625 | s->timeout_task = GNUNET_SCHEDULER_add_delayed (HTTP_CLIENT_SESSION_TIMEOUT, |
1626 | &client_session_timeout, | 1626 | &client_session_timeout, |
1627 | s); | 1627 | s); |
1628 | GNUNET_log (TIMEOUT_LOG, | 1628 | GNUNET_log (TIMEOUT_LOG, |
1629 | "Timeout for session %p set to %s\n", | 1629 | "Timeout for session %p set to %s\n", |
1630 | s, | 1630 | s, |
1631 | GNUNET_STRINGS_relative_time_to_string (CLIENT_SESSION_TIMEOUT, | 1631 | GNUNET_STRINGS_relative_time_to_string (HTTP_CLIENT_SESSION_TIMEOUT, |
1632 | GNUNET_YES)); | 1632 | GNUNET_YES)); |
1633 | } | 1633 | } |
1634 | 1634 | ||
@@ -1646,13 +1646,13 @@ client_reschedule_session_timeout (struct Session *s) | |||
1646 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK != s->timeout_task); | 1646 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK != s->timeout_task); |
1647 | 1647 | ||
1648 | GNUNET_SCHEDULER_cancel (s->timeout_task); | 1648 | GNUNET_SCHEDULER_cancel (s->timeout_task); |
1649 | s->timeout_task = GNUNET_SCHEDULER_add_delayed (CLIENT_SESSION_TIMEOUT, | 1649 | s->timeout_task = GNUNET_SCHEDULER_add_delayed (HTTP_CLIENT_SESSION_TIMEOUT, |
1650 | &client_session_timeout, | 1650 | &client_session_timeout, |
1651 | s); | 1651 | s); |
1652 | GNUNET_log (TIMEOUT_LOG, | 1652 | GNUNET_log (TIMEOUT_LOG, |
1653 | "Timeout rescheduled for session %p set to %s\n", | 1653 | "Timeout rescheduled for session %p set to %s\n", |
1654 | s, | 1654 | s, |
1655 | GNUNET_STRINGS_relative_time_to_string (CLIENT_SESSION_TIMEOUT, | 1655 | GNUNET_STRINGS_relative_time_to_string (HTTP_CLIENT_SESSION_TIMEOUT, |
1656 | GNUNET_YES)); | 1656 | GNUNET_YES)); |
1657 | } | 1657 | } |
1658 | 1658 | ||
diff --git a/src/transport/plugin_transport_http_common.h b/src/transport/plugin_transport_http_common.h index 51473d73a..33a5b38f5 100644 --- a/src/transport/plugin_transport_http_common.h +++ b/src/transport/plugin_transport_http_common.h | |||
@@ -36,7 +36,7 @@ | |||
36 | #if TESTING | 36 | #if TESTING |
37 | #define HTTP_SERVER_NOT_VALIDATED_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 3) | 37 | #define HTTP_SERVER_NOT_VALIDATED_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 3) |
38 | #define HTTP_CLIENT_NOT_VALIDATED_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 3) | 38 | #define HTTP_CLIENT_NOT_VALIDATED_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 3) |
39 | #define CLIENT_SESSION_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 7) | 39 | #define HTTP_CLIENT_SESSION_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 7) |
40 | #define SERVER_SESSION_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 7) | 40 | #define SERVER_SESSION_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 7) |
41 | #define TIMEOUT_LOG GNUNET_ERROR_TYPE_DEBUG | 41 | #define TIMEOUT_LOG GNUNET_ERROR_TYPE_DEBUG |
42 | 42 | ||
@@ -50,8 +50,8 @@ | |||
50 | 50 | ||
51 | #define HTTP_SERVER_NOT_VALIDATED_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 15) | 51 | #define HTTP_SERVER_NOT_VALIDATED_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 15) |
52 | #define HTTP_CLIENT_NOT_VALIDATED_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 15) | 52 | #define HTTP_CLIENT_NOT_VALIDATED_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 15) |
53 | #define CLIENT_SESSION_TIMEOUT GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT | 53 | #define HTTP_CLIENT_SESSION_TIMEOUT GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT |
54 | #define SERVER_SESSION_TIMEOUT GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT | 54 | #define HTTP_SERVER_SESSION_TIMEOUT GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT |
55 | #define TIMEOUT_LOG GNUNET_ERROR_TYPE_DEBUG | 55 | #define TIMEOUT_LOG GNUNET_ERROR_TYPE_DEBUG |
56 | 56 | ||
57 | #endif | 57 | #endif |
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c index 9e4e54e67..a1c321d1f 100644 --- a/src/transport/plugin_transport_http_server.c +++ b/src/transport/plugin_transport_http_server.c | |||
@@ -1190,7 +1190,7 @@ server_lookup_connection (struct HTTP_Server_Plugin *plugin, | |||
1190 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, | 1190 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, |
1191 | "Session %p for peer `%s' fully connected\n", | 1191 | "Session %p for peer `%s' fully connected\n", |
1192 | s, GNUNET_i2s (&target)); | 1192 | s, GNUNET_i2s (&target)); |
1193 | to = (SERVER_SESSION_TIMEOUT.rel_value_us / 1000LL / 1000LL); | 1193 | to = (HTTP_SERVER_SESSION_TIMEOUT.rel_value_us / 1000LL / 1000LL); |
1194 | server_mhd_connection_timeout (plugin, s, to); | 1194 | server_mhd_connection_timeout (plugin, s, to); |
1195 | } | 1195 | } |
1196 | 1196 | ||
@@ -2013,7 +2013,7 @@ server_start (struct HTTP_Server_Plugin *plugin) | |||
2013 | "MHD can set timeout per connection! Default time out %u sec.\n", | 2013 | "MHD can set timeout per connection! Default time out %u sec.\n", |
2014 | timeout); | 2014 | timeout); |
2015 | #else | 2015 | #else |
2016 | timeout = SERVER_SESSION_TIMEOUT.rel_value_us / 1000LL / 1000LL; | 2016 | timeout = HTTP_SERVER_SESSION_TIMEOUT.rel_value_us / 1000LL / 1000LL; |
2017 | GNUNET_log_from (GNUNET_ERROR_TYPE_WARNING, plugin->name, | 2017 | GNUNET_log_from (GNUNET_ERROR_TYPE_WARNING, plugin->name, |
2018 | "MHD cannot set timeout per connection! Default time out %u sec.\n", | 2018 | "MHD cannot set timeout per connection! Default time out %u sec.\n", |
2019 | timeout); | 2019 | timeout); |
@@ -2889,7 +2889,7 @@ server_session_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc | |||
2889 | GNUNET_log (TIMEOUT_LOG, | 2889 | GNUNET_log (TIMEOUT_LOG, |
2890 | "Session %p was idle for %s, disconnecting\n", | 2890 | "Session %p was idle for %s, disconnecting\n", |
2891 | s, | 2891 | s, |
2892 | GNUNET_STRINGS_relative_time_to_string (SERVER_SESSION_TIMEOUT, | 2892 | GNUNET_STRINGS_relative_time_to_string (HTTP_SERVER_SESSION_TIMEOUT, |
2893 | GNUNET_YES)); | 2893 | GNUNET_YES)); |
2894 | 2894 | ||
2895 | /* call session destroy function */ | 2895 | /* call session destroy function */ |
@@ -2907,13 +2907,13 @@ server_start_session_timeout (struct Session *s) | |||
2907 | { | 2907 | { |
2908 | GNUNET_assert (NULL != s); | 2908 | GNUNET_assert (NULL != s); |
2909 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == s->timeout_task); | 2909 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == s->timeout_task); |
2910 | s->timeout_task = GNUNET_SCHEDULER_add_delayed (SERVER_SESSION_TIMEOUT, | 2910 | s->timeout_task = GNUNET_SCHEDULER_add_delayed (HTTP_SERVER_SESSION_TIMEOUT, |
2911 | &server_session_timeout, | 2911 | &server_session_timeout, |
2912 | s); | 2912 | s); |
2913 | GNUNET_log (TIMEOUT_LOG, | 2913 | GNUNET_log (TIMEOUT_LOG, |
2914 | "Timeout for session %p set to %s\n", | 2914 | "Timeout for session %p set to %s\n", |
2915 | s, | 2915 | s, |
2916 | GNUNET_STRINGS_relative_time_to_string (SERVER_SESSION_TIMEOUT, | 2916 | GNUNET_STRINGS_relative_time_to_string (HTTP_SERVER_SESSION_TIMEOUT, |
2917 | GNUNET_YES)); | 2917 | GNUNET_YES)); |
2918 | } | 2918 | } |
2919 | 2919 | ||
@@ -2930,13 +2930,13 @@ server_reschedule_session_timeout (struct Session *s) | |||
2930 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK != s->timeout_task); | 2930 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK != s->timeout_task); |
2931 | 2931 | ||
2932 | GNUNET_SCHEDULER_cancel (s->timeout_task); | 2932 | GNUNET_SCHEDULER_cancel (s->timeout_task); |
2933 | s->timeout_task = GNUNET_SCHEDULER_add_delayed (SERVER_SESSION_TIMEOUT, | 2933 | s->timeout_task = GNUNET_SCHEDULER_add_delayed (HTTP_SERVER_SESSION_TIMEOUT, |
2934 | &server_session_timeout, | 2934 | &server_session_timeout, |
2935 | s); | 2935 | s); |
2936 | GNUNET_log (TIMEOUT_LOG, | 2936 | GNUNET_log (TIMEOUT_LOG, |
2937 | "Timeout rescheduled for session %p set to %s\n", | 2937 | "Timeout rescheduled for session %p set to %s\n", |
2938 | s, | 2938 | s, |
2939 | GNUNET_STRINGS_relative_time_to_string (SERVER_SESSION_TIMEOUT, | 2939 | GNUNET_STRINGS_relative_time_to_string (HTTP_SERVER_SESSION_TIMEOUT, |
2940 | GNUNET_YES)); | 2940 | GNUNET_YES)); |
2941 | } | 2941 | } |
2942 | 2942 | ||