diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-01-25 15:09:34 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-01-25 15:09:34 +0000 |
commit | 49e84a08e2bbdcc421a24bfe1ccd9cc15846fe2b (patch) | |
tree | 8692c9595f50b3bedc057d4c816e0de21921ea17 /src/transport/plugin_transport_http_server.c | |
parent | efb4b8bd6b8de4339a086dedec490dc3f01e8d5f (diff) | |
download | gnunet-49e84a08e2bbdcc421a24bfe1ccd9cc15846fe2b.tar.gz gnunet-49e84a08e2bbdcc421a24bfe1ccd9cc15846fe2b.zip |
- clang
Diffstat (limited to 'src/transport/plugin_transport_http_server.c')
-rw-r--r-- | src/transport/plugin_transport_http_server.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c index 10c8268b1..3d09e866e 100644 --- a/src/transport/plugin_transport_http_server.c +++ b/src/transport/plugin_transport_http_server.c | |||
@@ -407,8 +407,11 @@ server_lookup_session (struct Plugin *plugin, | |||
407 | 407 | ||
408 | if (0 == strcmp (MHD_HTTP_METHOD_PUT, method)) | 408 | if (0 == strcmp (MHD_HTTP_METHOD_PUT, method)) |
409 | direction = _RECEIVE; | 409 | direction = _RECEIVE; |
410 | if (0 == strcmp (MHD_HTTP_METHOD_GET, method)) | 410 | else if (0 == strcmp (MHD_HTTP_METHOD_GET, method)) |
411 | direction = _SEND; | 411 | direction = _SEND; |
412 | else | ||
413 | GNUNET_break_op (0); | ||
414 | |||
412 | 415 | ||
413 | if (check == GNUNET_NO) | 416 | if (check == GNUNET_NO) |
414 | goto error; | 417 | goto error; |
@@ -672,7 +675,7 @@ server_access_cb (void *cls, struct MHD_Connection *mhd_connection, | |||
672 | response = | 675 | response = |
673 | MHD_create_response_from_callback (-1, 32 * 1024, &server_send_callback, | 676 | MHD_create_response_from_callback (-1, 32 * 1024, &server_send_callback, |
674 | s, NULL); | 677 | s, NULL); |
675 | res = MHD_queue_response (mhd_connection, MHD_HTTP_OK, response); | 678 | MHD_queue_response (mhd_connection, MHD_HTTP_OK, response); |
676 | MHD_destroy_response (response); | 679 | MHD_destroy_response (response); |
677 | return MHD_YES; | 680 | return MHD_YES; |
678 | } | 681 | } |
@@ -714,7 +717,6 @@ server_access_cb (void *cls, struct MHD_Connection *mhd_connection, | |||
714 | { | 717 | { |
715 | s->msg_tk = GNUNET_SERVER_mst_create (&server_receive_mst_cb, s); | 718 | s->msg_tk = GNUNET_SERVER_mst_create (&server_receive_mst_cb, s); |
716 | } | 719 | } |
717 | res = | ||
718 | GNUNET_SERVER_mst_receive (s->msg_tk, s, upload_data, | 720 | GNUNET_SERVER_mst_receive (s->msg_tk, s, upload_data, |
719 | *upload_data_size, GNUNET_NO, GNUNET_NO); | 721 | *upload_data_size, GNUNET_NO, GNUNET_NO); |
720 | 722 | ||
@@ -781,7 +783,7 @@ server_disconnect_cb (void *cls, struct MHD_Connection *connection, | |||
781 | void **httpSessionCache) | 783 | void **httpSessionCache) |
782 | { | 784 | { |
783 | struct ServerConnection *sc = *httpSessionCache; | 785 | struct ServerConnection *sc = *httpSessionCache; |
784 | struct ServerConnection *tc = *httpSessionCache; | 786 | struct ServerConnection *tc = NULL; |
785 | struct Session *s = NULL; | 787 | struct Session *s = NULL; |
786 | struct Session *t = NULL; | 788 | struct Session *t = NULL; |
787 | struct Plugin *plugin = NULL; | 789 | struct Plugin *plugin = NULL; |
@@ -1250,7 +1252,7 @@ server_stop (struct Plugin *plugin) | |||
1250 | #endif | 1252 | #endif |
1251 | t = s->next; | 1253 | t = s->next; |
1252 | struct HTTP_Message *msg = s->msg_head; | 1254 | struct HTTP_Message *msg = s->msg_head; |
1253 | struct HTTP_Message *tmp = s->msg_head; | 1255 | struct HTTP_Message *tmp = NULL; |
1254 | 1256 | ||
1255 | while (msg != NULL) | 1257 | while (msg != NULL) |
1256 | { | 1258 | { |