diff options
Diffstat (limited to 'src/exchange/taler-exchange-httpd.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c index 8b89cf971..bdb213a87 100644 --- a/src/exchange/taler-exchange-httpd.c +++ b/src/exchange/taler-exchange-httpd.c | |||
@@ -167,8 +167,11 @@ handle_mhd_completion_callback (void *cls, | |||
167 | { | 167 | { |
168 | struct ExchangeHttpRequestClosure *ecls = *con_cls; | 168 | struct ExchangeHttpRequestClosure *ecls = *con_cls; |
169 | 169 | ||
170 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Request completed\n"); | 170 | (void) cls; |
171 | 171 | (void) connection; | |
172 | (void) toe; | ||
173 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | ||
174 | "Request completed\n"); | ||
172 | if (NULL == ecls) | 175 | if (NULL == ecls) |
173 | return; | 176 | return; |
174 | TEH_PARSE_post_cleanup_callback (ecls->opaque_post_parsing_context); | 177 | TEH_PARSE_post_cleanup_callback (ecls->opaque_post_parsing_context); |
@@ -186,14 +189,14 @@ handle_mhd_completion_callback (void *cls, | |||
186 | * Return GNUNET_YES if given a valid correlation ID and | 189 | * Return GNUNET_YES if given a valid correlation ID and |
187 | * GNUNET_NO otherwise. | 190 | * GNUNET_NO otherwise. |
188 | * | 191 | * |
189 | * @returns GNUNET_YES iff given a valid correlation ID | 192 | * @returns #GNUNET_YES iff given a valid correlation ID |
190 | */ | 193 | */ |
191 | static int | 194 | static int |
192 | is_valid_correlation_id (const char *correlation_id) | 195 | is_valid_correlation_id (const char *correlation_id) |
193 | { | 196 | { |
194 | if (strlen (correlation_id) >= 64) | 197 | if (strlen (correlation_id) >= 64) |
195 | return GNUNET_NO; | 198 | return GNUNET_NO; |
196 | for (int i = 0; i < strlen (correlation_id); i++) | 199 | for (size_t i = 0; i < strlen (correlation_id); i++) |
197 | if (! (isalnum (correlation_id[i]) || (correlation_id[i] == '-'))) | 200 | if (! (isalnum (correlation_id[i]) || (correlation_id[i] == '-'))) |
198 | return GNUNET_NO; | 201 | return GNUNET_NO; |
199 | return GNUNET_YES; | 202 | return GNUNET_YES; |
@@ -401,7 +404,7 @@ handle_mhd_request (void *cls, | |||
401 | "Only POST is allowed", 0, | 404 | "Only POST is allowed", 0, |
402 | &TEH_MHD_handler_send_json_pack_error, MHD_HTTP_METHOD_NOT_ALLOWED }, | 405 | &TEH_MHD_handler_send_json_pack_error, MHD_HTTP_METHOD_NOT_ALLOWED }, |
403 | #endif | 406 | #endif |
404 | { NULL, NULL, NULL, NULL, 0, 0 } | 407 | { NULL, NULL, NULL, NULL, 0, NULL, 0 } |
405 | }; | 408 | }; |
406 | static struct TEH_RequestHandler h404 = { | 409 | static struct TEH_RequestHandler h404 = { |
407 | "", NULL, "text/html", | 410 | "", NULL, "text/html", |
@@ -415,6 +418,8 @@ handle_mhd_request (void *cls, | |||
415 | struct GNUNET_AsyncScopeSave old_scope; | 418 | struct GNUNET_AsyncScopeSave old_scope; |
416 | const char *correlation_id = NULL; | 419 | const char *correlation_id = NULL; |
417 | 420 | ||
421 | (void) cls; | ||
422 | (void) version; | ||
418 | if (NULL == ecls) | 423 | if (NULL == ecls) |
419 | { | 424 | { |
420 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Handling new request\n"); | 425 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Handling new request\n"); |
@@ -817,6 +822,9 @@ connection_done (void *cls, | |||
817 | void **socket_context, | 822 | void **socket_context, |
818 | enum MHD_ConnectionNotificationCode toe) | 823 | enum MHD_ConnectionNotificationCode toe) |
819 | { | 824 | { |
825 | (void) cls; | ||
826 | (void) connection; | ||
827 | (void) socket_context; | ||
820 | /* We only act if the connection is closed. */ | 828 | /* We only act if the connection is closed. */ |
821 | if (MHD_CONNECTION_NOTIFY_CLOSED != toe) | 829 | if (MHD_CONNECTION_NOTIFY_CLOSED != toe) |
822 | return; | 830 | return; |
@@ -849,6 +857,7 @@ handle_mhd_logs (void *cls, | |||
849 | static int cache; | 857 | static int cache; |
850 | char buf[2048]; | 858 | char buf[2048]; |
851 | 859 | ||
860 | (void) cls; | ||
852 | if (-1 == cache) | 861 | if (-1 == cache) |
853 | return; | 862 | return; |
854 | if (0 == cache) | 863 | if (0 == cache) |