diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2010-07-13 13:14:55 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2010-07-13 13:14:55 +0000 |
commit | 0389303e81225719c8c1f4975391673da9bb1513 (patch) | |
tree | 148adcb31b57c5a44c85efc98debee5d15a08fa4 | |
parent | e4ab5c979af8839adc4527bd31e52fa87a0fa3ad (diff) | |
download | gnunet-0389303e81225719c8c1f4975391673da9bb1513.tar.gz gnunet-0389303e81225719c8c1f4975391673da9bb1513.zip |
-rw-r--r-- | src/transport/plugin_transport_http.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c index 9abf0cf37..b346ad876 100644 --- a/src/transport/plugin_transport_http.c +++ b/src/transport/plugin_transport_http.c | |||
@@ -71,10 +71,6 @@ | |||
71 | */ | 71 | */ |
72 | #define HTTP_CONNECT_TIMEOUT 30 | 72 | #define HTTP_CONNECT_TIMEOUT 30 |
73 | 73 | ||
74 | #ifdef GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT | ||
75 | #undef GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT | ||
76 | #endif | ||
77 | #define GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) | ||
78 | 74 | ||
79 | /** | 75 | /** |
80 | * Network format for IPv4 addresses. | 76 | * Network format for IPv4 addresses. |
@@ -765,7 +761,7 @@ mdh_access_cb (void *cls, | |||
765 | /* Is it a PUT or a GET request */ | 761 | /* Is it a PUT or a GET request */ |
766 | if (0 == strcmp (MHD_HTTP_METHOD_PUT, method)) | 762 | if (0 == strcmp (MHD_HTTP_METHOD_PUT, method)) |
767 | { | 763 | { |
768 | if (ps->recv_force_disconnect) | 764 | if (ps->recv_force_disconnect == GNUNET_YES) |
769 | { | 765 | { |
770 | #if DEBUG_CONNECTIONS | 766 | #if DEBUG_CONNECTIONS |
771 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Connection %X: inbound connection was forced to disconnect\n",ps); | 767 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Connection %X: inbound connection was forced to disconnect\n",ps); |
@@ -778,6 +774,7 @@ mdh_access_cb (void *cls, | |||
778 | ps->recv_endpoint = mhd_connection; | 774 | ps->recv_endpoint = mhd_connection; |
779 | ps->recv_connected = GNUNET_YES; | 775 | ps->recv_connected = GNUNET_YES; |
780 | ps->recv_active = GNUNET_YES; | 776 | ps->recv_active = GNUNET_YES; |
777 | ps->recv_force_disconnect = GNUNET_NO; | ||
781 | #if DEBUG_CONNECTIONS | 778 | #if DEBUG_CONNECTIONS |
782 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Connection %X: inbound PUT connection connected\n",ps); | 779 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Connection %X: inbound PUT connection connected\n",ps); |
783 | #endif | 780 | #endif |
@@ -817,11 +814,10 @@ mdh_access_cb (void *cls, | |||
817 | ps->send_active = GNUNET_NO; | 814 | ps->send_active = GNUNET_NO; |
818 | return MHD_NO; | 815 | return MHD_NO; |
819 | } | 816 | } |
820 | else | ||
821 | { | ||
822 | ps->send_connected = GNUNET_YES; | 817 | ps->send_connected = GNUNET_YES; |
823 | ps->send_active = GNUNET_YES; | 818 | ps->send_active = GNUNET_YES; |
824 | ps->send_endpoint = mhd_connection; | 819 | ps->send_endpoint = mhd_connection; |
820 | ps->send_force_disconnect = GNUNET_NO; | ||
825 | #if DEBUG_CONNECTIONS | 821 | #if DEBUG_CONNECTIONS |
826 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Connection %X: inbound GET connection connected\n",ps); | 822 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Connection %X: inbound GET connection connected\n",ps); |
827 | #endif | 823 | #endif |
@@ -829,7 +825,6 @@ mdh_access_cb (void *cls, | |||
829 | res = MHD_queue_response (mhd_connection, MHD_HTTP_OK, response); | 825 | res = MHD_queue_response (mhd_connection, MHD_HTTP_OK, response); |
830 | MHD_destroy_response (response); | 826 | MHD_destroy_response (response); |
831 | return MHD_YES; | 827 | return MHD_YES; |
832 | } | ||
833 | } | 828 | } |
834 | return MHD_NO; | 829 | return MHD_NO; |
835 | } | 830 | } |