diff options
Diffstat (limited to 'src')
73 files changed, 212 insertions, 198 deletions
diff --git a/src/examples/authorization_example.c b/src/examples/authorization_example.c index 40bffcb7..644b03ef 100644 --- a/src/examples/authorization_example.c +++ b/src/examples/authorization_example.c | |||
@@ -39,7 +39,7 @@ | |||
39 | "<html><head><title>Access denied</title></head><body>Access denied</body></html>" | 39 | "<html><head><title>Access denied</title></head><body>Access denied</body></html>" |
40 | 40 | ||
41 | 41 | ||
42 | static int | 42 | static enum MHD_Result |
43 | ahc_echo (void *cls, | 43 | ahc_echo (void *cls, |
44 | struct MHD_Connection *connection, | 44 | struct MHD_Connection *connection, |
45 | const char *url, | 45 | const char *url, |
@@ -50,7 +50,7 @@ ahc_echo (void *cls, | |||
50 | static int aptr; | 50 | static int aptr; |
51 | const char *me = cls; | 51 | const char *me = cls; |
52 | struct MHD_Response *response; | 52 | struct MHD_Response *response; |
53 | int ret; | 53 | enum MHD_Result ret; |
54 | char *user; | 54 | char *user; |
55 | char *pass; | 55 | char *pass; |
56 | int fail; | 56 | int fail; |
diff --git a/src/examples/benchmark.c b/src/examples/benchmark.c index 9b07e5c8..939995c9 100644 --- a/src/examples/benchmark.c +++ b/src/examples/benchmark.c | |||
@@ -106,7 +106,7 @@ uri_logger_cb (void *cls, | |||
106 | } | 106 | } |
107 | 107 | ||
108 | 108 | ||
109 | static int | 109 | static enum MHD_Result |
110 | ahc_echo (void *cls, | 110 | ahc_echo (void *cls, |
111 | struct MHD_Connection *connection, | 111 | struct MHD_Connection *connection, |
112 | const char *url, | 112 | const char *url, |
diff --git a/src/examples/benchmark_https.c b/src/examples/benchmark_https.c index 53b83e0a..6f0cd478 100644 --- a/src/examples/benchmark_https.c +++ b/src/examples/benchmark_https.c | |||
@@ -106,7 +106,7 @@ uri_logger_cb (void *cls, | |||
106 | } | 106 | } |
107 | 107 | ||
108 | 108 | ||
109 | static int | 109 | static enum MHD_Result |
110 | ahc_echo (void *cls, | 110 | ahc_echo (void *cls, |
111 | struct MHD_Connection *connection, | 111 | struct MHD_Connection *connection, |
112 | const char *url, | 112 | const char *url, |
diff --git a/src/examples/chunked_example.c b/src/examples/chunked_example.c index 9b2cb51c..19a37155 100644 --- a/src/examples/chunked_example.c +++ b/src/examples/chunked_example.c | |||
@@ -86,7 +86,7 @@ static const char simple_response_text[] = | |||
86 | "<body>Simple response text</body></html>"; | 86 | "<body>Simple response text</body></html>"; |
87 | 87 | ||
88 | 88 | ||
89 | static int | 89 | static enum MHD_Result |
90 | ahc_echo (void *cls, | 90 | ahc_echo (void *cls, |
91 | struct MHD_Connection *connection, | 91 | struct MHD_Connection *connection, |
92 | const char *url, | 92 | const char *url, |
@@ -99,7 +99,7 @@ ahc_echo (void *cls, | |||
99 | static int aptr; | 99 | static int aptr; |
100 | struct ResponseContentCallbackParam *callback_param; | 100 | struct ResponseContentCallbackParam *callback_param; |
101 | struct MHD_Response *response; | 101 | struct MHD_Response *response; |
102 | int ret; | 102 | enum MHD_Result ret; |
103 | (void) cls; /* Unused. Silent compiler warning. */ | 103 | (void) cls; /* Unused. Silent compiler warning. */ |
104 | (void) url; /* Unused. Silent compiler warning. */ | 104 | (void) url; /* Unused. Silent compiler warning. */ |
105 | (void) version; /* Unused. Silent compiler warning. */ | 105 | (void) version; /* Unused. Silent compiler warning. */ |
diff --git a/src/examples/demo.c b/src/examples/demo.c index c7ad4b30..978bd235 100644 --- a/src/examples/demo.c +++ b/src/examples/demo.c | |||
@@ -264,7 +264,7 @@ struct ResponseDataContext | |||
264 | * @param dirname name of the directory to list | 264 | * @param dirname name of the directory to list |
265 | * @return #MHD_YES on success, #MHD_NO on error | 265 | * @return #MHD_YES on success, #MHD_NO on error |
266 | */ | 266 | */ |
267 | static int | 267 | static enum MHD_Result |
268 | list_directory (struct ResponseDataContext *rdc, | 268 | list_directory (struct ResponseDataContext *rdc, |
269 | const char *dirname) | 269 | const char *dirname) |
270 | { | 270 | { |
@@ -444,7 +444,7 @@ struct UploadContext | |||
444 | * @param size number of bytes in 'data' | 444 | * @param size number of bytes in 'data' |
445 | * @return #MHD_NO on allocation failure, #MHD_YES on success | 445 | * @return #MHD_NO on allocation failure, #MHD_YES on success |
446 | */ | 446 | */ |
447 | static int | 447 | static enum MHD_Result |
448 | do_append (char **ret, | 448 | do_append (char **ret, |
449 | const char *data, | 449 | const char *data, |
450 | size_t size) | 450 | size_t size) |
@@ -493,7 +493,7 @@ do_append (char **ret, | |||
493 | * @return #MHD_YES to continue iterating, | 493 | * @return #MHD_YES to continue iterating, |
494 | * #MHD_NO to abort the iteration | 494 | * #MHD_NO to abort the iteration |
495 | */ | 495 | */ |
496 | static int | 496 | static enum MHD_Result |
497 | process_upload_data (void *cls, | 497 | process_upload_data (void *cls, |
498 | enum MHD_ValueKind kind, | 498 | enum MHD_ValueKind kind, |
499 | const char *key, | 499 | const char *key, |
@@ -662,12 +662,12 @@ response_completed_callback (void *cls, | |||
662 | * Return the current directory listing. | 662 | * Return the current directory listing. |
663 | * | 663 | * |
664 | * @param connection connection to return the directory for | 664 | * @param connection connection to return the directory for |
665 | * @return MHD_YES on success, MHD_NO on error | 665 | * @return #MHD_YES on success, #MHD_NO on error |
666 | */ | 666 | */ |
667 | static int | 667 | static enum MHD_Result |
668 | return_directory_response (struct MHD_Connection *connection) | 668 | return_directory_response (struct MHD_Connection *connection) |
669 | { | 669 | { |
670 | int ret; | 670 | enum MHD_Result ret; |
671 | 671 | ||
672 | (void) pthread_mutex_lock (&mutex); | 672 | (void) pthread_mutex_lock (&mutex); |
673 | if (NULL == cached_directory_response) | 673 | if (NULL == cached_directory_response) |
@@ -696,7 +696,7 @@ return_directory_response (struct MHD_Connection *connection) | |||
696 | * @param ptr our context | 696 | * @param ptr our context |
697 | * @return #MHD_YES on success, #MHD_NO to drop connection | 697 | * @return #MHD_YES on success, #MHD_NO to drop connection |
698 | */ | 698 | */ |
699 | static int | 699 | static enum MHD_Result |
700 | generate_page (void *cls, | 700 | generate_page (void *cls, |
701 | struct MHD_Connection *connection, | 701 | struct MHD_Connection *connection, |
702 | const char *url, | 702 | const char *url, |
@@ -706,7 +706,7 @@ generate_page (void *cls, | |||
706 | size_t *upload_data_size, void **ptr) | 706 | size_t *upload_data_size, void **ptr) |
707 | { | 707 | { |
708 | struct MHD_Response *response; | 708 | struct MHD_Response *response; |
709 | int ret; | 709 | enum MHD_Result ret; |
710 | int fd; | 710 | int fd; |
711 | struct stat buf; | 711 | struct stat buf; |
712 | (void) cls; /* Unused. Silent compiler warning. */ | 712 | (void) cls; /* Unused. Silent compiler warning. */ |
diff --git a/src/examples/demo_https.c b/src/examples/demo_https.c index 7cd98b68..2a60fcda 100644 --- a/src/examples/demo_https.c +++ b/src/examples/demo_https.c | |||
@@ -267,7 +267,7 @@ struct ResponseDataContext | |||
267 | * @param dirname name of the directory to list | 267 | * @param dirname name of the directory to list |
268 | * @return MHD_YES on success, MHD_NO on error | 268 | * @return MHD_YES on success, MHD_NO on error |
269 | */ | 269 | */ |
270 | static int | 270 | static enum MHD_Result |
271 | list_directory (struct ResponseDataContext *rdc, | 271 | list_directory (struct ResponseDataContext *rdc, |
272 | const char *dirname) | 272 | const char *dirname) |
273 | { | 273 | { |
@@ -447,7 +447,7 @@ struct UploadContext | |||
447 | * @param size number of bytes in 'data' | 447 | * @param size number of bytes in 'data' |
448 | * @return #MHD_NO on allocation failure, #MHD_YES on success | 448 | * @return #MHD_NO on allocation failure, #MHD_YES on success |
449 | */ | 449 | */ |
450 | static int | 450 | static enum MHD_Result |
451 | do_append (char **ret, | 451 | do_append (char **ret, |
452 | const char *data, | 452 | const char *data, |
453 | size_t size) | 453 | size_t size) |
@@ -493,10 +493,10 @@ do_append (char **ret, | |||
493 | * specified offset | 493 | * specified offset |
494 | * @param off offset of data in the overall value | 494 | * @param off offset of data in the overall value |
495 | * @param size number of bytes in data available | 495 | * @param size number of bytes in data available |
496 | * @return MHD_YES to continue iterating, | 496 | * @return #MHD_YES to continue iterating, |
497 | * MHD_NO to abort the iteration | 497 | * #MHD_NO to abort the iteration |
498 | */ | 498 | */ |
499 | static int | 499 | static enum MHD_Result |
500 | process_upload_data (void *cls, | 500 | process_upload_data (void *cls, |
501 | enum MHD_ValueKind kind, | 501 | enum MHD_ValueKind kind, |
502 | const char *key, | 502 | const char *key, |
@@ -667,10 +667,10 @@ response_completed_callback (void *cls, | |||
667 | * @param connection connection to return the directory for | 667 | * @param connection connection to return the directory for |
668 | * @return MHD_YES on success, MHD_NO on error | 668 | * @return MHD_YES on success, MHD_NO on error |
669 | */ | 669 | */ |
670 | static int | 670 | static enum MHD_Result |
671 | return_directory_response (struct MHD_Connection *connection) | 671 | return_directory_response (struct MHD_Connection *connection) |
672 | { | 672 | { |
673 | int ret; | 673 | enum MHD_Result ret; |
674 | 674 | ||
675 | (void) pthread_mutex_lock (&mutex); | 675 | (void) pthread_mutex_lock (&mutex); |
676 | if (NULL == cached_directory_response) | 676 | if (NULL == cached_directory_response) |
@@ -699,7 +699,7 @@ return_directory_response (struct MHD_Connection *connection) | |||
699 | * @param ptr our context | 699 | * @param ptr our context |
700 | * @return #MHD_YES on success, #MHD_NO to drop connection | 700 | * @return #MHD_YES on success, #MHD_NO to drop connection |
701 | */ | 701 | */ |
702 | static int | 702 | static enum MHD_Result |
703 | generate_page (void *cls, | 703 | generate_page (void *cls, |
704 | struct MHD_Connection *connection, | 704 | struct MHD_Connection *connection, |
705 | const char *url, | 705 | const char *url, |
@@ -709,7 +709,7 @@ generate_page (void *cls, | |||
709 | size_t *upload_data_size, void **ptr) | 709 | size_t *upload_data_size, void **ptr) |
710 | { | 710 | { |
711 | struct MHD_Response *response; | 711 | struct MHD_Response *response; |
712 | int ret; | 712 | enum MHD_Result ret; |
713 | int fd; | 713 | int fd; |
714 | struct stat buf; | 714 | struct stat buf; |
715 | (void) cls; /* Unused. Silent compiler warning. */ | 715 | (void) cls; /* Unused. Silent compiler warning. */ |
diff --git a/src/examples/digest_auth_example.c b/src/examples/digest_auth_example.c index 25fb4086..e3edf206 100644 --- a/src/examples/digest_auth_example.c +++ b/src/examples/digest_auth_example.c | |||
@@ -34,7 +34,7 @@ | |||
34 | 34 | ||
35 | #define MY_OPAQUE_STR "11733b200778ce33060f31c9af70a870ba96ddd4" | 35 | #define MY_OPAQUE_STR "11733b200778ce33060f31c9af70a870ba96ddd4" |
36 | 36 | ||
37 | static int | 37 | static enum MHD_Result |
38 | ahc_echo (void *cls, | 38 | ahc_echo (void *cls, |
39 | struct MHD_Connection *connection, | 39 | struct MHD_Connection *connection, |
40 | const char *url, | 40 | const char *url, |
@@ -46,7 +46,7 @@ ahc_echo (void *cls, | |||
46 | char *username; | 46 | char *username; |
47 | const char *password = "testpass"; | 47 | const char *password = "testpass"; |
48 | const char *realm = "test@example.com"; | 48 | const char *realm = "test@example.com"; |
49 | int ret; | 49 | enum MHD_Result ret; |
50 | (void) cls; /* Unused. Silent compiler warning. */ | 50 | (void) cls; /* Unused. Silent compiler warning. */ |
51 | (void) url; /* Unused. Silent compiler warning. */ | 51 | (void) url; /* Unused. Silent compiler warning. */ |
52 | (void) method; /* Unused. Silent compiler warning. */ | 52 | (void) method; /* Unused. Silent compiler warning. */ |
diff --git a/src/examples/dual_stack_example.c b/src/examples/dual_stack_example.c index ffacec4a..15bafc44 100644 --- a/src/examples/dual_stack_example.c +++ b/src/examples/dual_stack_example.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #define PAGE \ | 28 | #define PAGE \ |
29 | "<html><head><title>libmicrohttpd demo</title></head><body>libmicrohttpd demo</body></html>" | 29 | "<html><head><title>libmicrohttpd demo</title></head><body>libmicrohttpd demo</body></html>" |
30 | 30 | ||
31 | static int | 31 | static enum MHD_Result |
32 | ahc_echo (void *cls, | 32 | ahc_echo (void *cls, |
33 | struct MHD_Connection *connection, | 33 | struct MHD_Connection *connection, |
34 | const char *url, | 34 | const char *url, |
@@ -39,7 +39,7 @@ ahc_echo (void *cls, | |||
39 | static int aptr; | 39 | static int aptr; |
40 | const char *me = cls; | 40 | const char *me = cls; |
41 | struct MHD_Response *response; | 41 | struct MHD_Response *response; |
42 | int ret; | 42 | enum MHD_Result ret; |
43 | (void) url; /* Unused. Silent compiler warning. */ | 43 | (void) url; /* Unused. Silent compiler warning. */ |
44 | (void) version; /* Unused. Silent compiler warning. */ | 44 | (void) version; /* Unused. Silent compiler warning. */ |
45 | (void) upload_data; /* Unused. Silent compiler warning. */ | 45 | (void) upload_data; /* Unused. Silent compiler warning. */ |
diff --git a/src/examples/fileserver_example.c b/src/examples/fileserver_example.c index 46e6aad6..767810f9 100644 --- a/src/examples/fileserver_example.c +++ b/src/examples/fileserver_example.c | |||
@@ -41,7 +41,7 @@ | |||
41 | #define S_ISREG(x) (S_IFREG == (x & S_IFREG)) | 41 | #define S_ISREG(x) (S_IFREG == (x & S_IFREG)) |
42 | #endif /* S_ISREG */ | 42 | #endif /* S_ISREG */ |
43 | 43 | ||
44 | static int | 44 | static enum MHD_Result |
45 | ahc_echo (void *cls, | 45 | ahc_echo (void *cls, |
46 | struct MHD_Connection *connection, | 46 | struct MHD_Connection *connection, |
47 | const char *url, | 47 | const char *url, |
@@ -52,7 +52,7 @@ ahc_echo (void *cls, | |||
52 | { | 52 | { |
53 | static int aptr; | 53 | static int aptr; |
54 | struct MHD_Response *response; | 54 | struct MHD_Response *response; |
55 | int ret; | 55 | enum MHD_Result ret; |
56 | int fd; | 56 | int fd; |
57 | struct stat buf; | 57 | struct stat buf; |
58 | (void) cls; /* Unused. Silent compiler warning. */ | 58 | (void) cls; /* Unused. Silent compiler warning. */ |
diff --git a/src/examples/fileserver_example_dirs.c b/src/examples/fileserver_example_dirs.c index 2b544b69..e6c9ed1f 100644 --- a/src/examples/fileserver_example_dirs.c +++ b/src/examples/fileserver_example_dirs.c | |||
@@ -81,7 +81,7 @@ dir_reader (void *cls, uint64_t pos, char *buf, size_t max) | |||
81 | } | 81 | } |
82 | 82 | ||
83 | 83 | ||
84 | static int | 84 | static enum MHD_Result |
85 | ahc_echo (void *cls, | 85 | ahc_echo (void *cls, |
86 | struct MHD_Connection *connection, | 86 | struct MHD_Connection *connection, |
87 | const char *url, | 87 | const char *url, |
@@ -92,7 +92,7 @@ ahc_echo (void *cls, | |||
92 | { | 92 | { |
93 | static int aptr; | 93 | static int aptr; |
94 | struct MHD_Response *response; | 94 | struct MHD_Response *response; |
95 | int ret; | 95 | enum MHD_Result ret; |
96 | FILE *file; | 96 | FILE *file; |
97 | int fd; | 97 | int fd; |
98 | DIR *dir; | 98 | DIR *dir; |
diff --git a/src/examples/fileserver_example_external_select.c b/src/examples/fileserver_example_external_select.c index 187cdf7e..7209751f 100644 --- a/src/examples/fileserver_example_external_select.c +++ b/src/examples/fileserver_example_external_select.c | |||
@@ -48,7 +48,7 @@ free_callback (void *cls) | |||
48 | } | 48 | } |
49 | 49 | ||
50 | 50 | ||
51 | static int | 51 | static enum MHD_Result |
52 | ahc_echo (void *cls, | 52 | ahc_echo (void *cls, |
53 | struct MHD_Connection *connection, | 53 | struct MHD_Connection *connection, |
54 | const char *url, | 54 | const char *url, |
@@ -59,7 +59,7 @@ ahc_echo (void *cls, | |||
59 | { | 59 | { |
60 | static int aptr; | 60 | static int aptr; |
61 | struct MHD_Response *response; | 61 | struct MHD_Response *response; |
62 | int ret; | 62 | enum MHD_Result ret; |
63 | FILE *file; | 63 | FILE *file; |
64 | int fd; | 64 | int fd; |
65 | struct stat buf; | 65 | struct stat buf; |
diff --git a/src/examples/http_chunked_compression.c b/src/examples/http_chunked_compression.c index ba71923b..07fd00ec 100644 --- a/src/examples/http_chunked_compression.c +++ b/src/examples/http_chunked_compression.c | |||
@@ -51,13 +51,13 @@ struct Holder | |||
51 | void *buf; | 51 | void *buf; |
52 | }; | 52 | }; |
53 | 53 | ||
54 | static int | 54 | static enum MHD_Result |
55 | compress_buf (z_stream *strm, const void *src, size_t src_size, size_t *offset, | 55 | compress_buf (z_stream *strm, const void *src, size_t src_size, size_t *offset, |
56 | void **dest, size_t *dest_size, | 56 | void **dest, size_t *dest_size, |
57 | void *tmp) | 57 | void *tmp) |
58 | { | 58 | { |
59 | unsigned int have; | 59 | unsigned int have; |
60 | int ret; | 60 | enum MHD_Result ret; |
61 | int flush; | 61 | int flush; |
62 | void *tmp_dest; | 62 | void *tmp_dest; |
63 | *dest = NULL; | 63 | *dest = NULL; |
@@ -152,14 +152,14 @@ free_cb (void *cls) | |||
152 | } | 152 | } |
153 | 153 | ||
154 | 154 | ||
155 | static int | 155 | static enum MHD_Result |
156 | ahc_echo (void *cls, struct MHD_Connection *con, const char *url, const | 156 | ahc_echo (void *cls, struct MHD_Connection *con, const char *url, const |
157 | char *method, const char *version, | 157 | char *method, const char *version, |
158 | const char *upload_data, size_t *upload_size, void **ptr) | 158 | const char *upload_data, size_t *upload_size, void **ptr) |
159 | { | 159 | { |
160 | struct Holder *holder; | 160 | struct Holder *holder; |
161 | struct MHD_Response *res; | 161 | struct MHD_Response *res; |
162 | int ret; | 162 | enum MHD_Result ret; |
163 | (void) cls; | 163 | (void) cls; |
164 | (void) url; | 164 | (void) url; |
165 | (void) method; | 165 | (void) method; |
diff --git a/src/examples/http_compression.c b/src/examples/http_compression.c index f7d8db21..0419a803 100644 --- a/src/examples/http_compression.c +++ b/src/examples/http_compression.c | |||
@@ -31,7 +31,7 @@ | |||
31 | "hello, hello. This is a 'hello world' message for the world, " \ | 31 | "hello, hello. This is a 'hello world' message for the world, " \ |
32 | "repeat, for the world.</body></html>" | 32 | "repeat, for the world.</body></html>" |
33 | 33 | ||
34 | static int | 34 | static enum MHD_Result |
35 | can_compress (struct MHD_Connection *con) | 35 | can_compress (struct MHD_Connection *con) |
36 | { | 36 | { |
37 | const char *ae; | 37 | const char *ae; |
@@ -60,7 +60,7 @@ can_compress (struct MHD_Connection *con) | |||
60 | } | 60 | } |
61 | 61 | ||
62 | 62 | ||
63 | static int | 63 | static enum MHD_Result |
64 | body_compress (void **buf, | 64 | body_compress (void **buf, |
65 | size_t *buf_size) | 65 | size_t *buf_size) |
66 | { | 66 | { |
@@ -90,7 +90,7 @@ body_compress (void **buf, | |||
90 | } | 90 | } |
91 | 91 | ||
92 | 92 | ||
93 | static int | 93 | static enum MHD_Result |
94 | ahc_echo (void *cls, | 94 | ahc_echo (void *cls, |
95 | struct MHD_Connection *connection, | 95 | struct MHD_Connection *connection, |
96 | const char *url, | 96 | const char *url, |
@@ -99,8 +99,8 @@ ahc_echo (void *cls, | |||
99 | const char *upload_data, size_t *upload_data_size, void **ptr) | 99 | const char *upload_data, size_t *upload_data_size, void **ptr) |
100 | { | 100 | { |
101 | struct MHD_Response *response; | 101 | struct MHD_Response *response; |
102 | int ret; | 102 | enum MHD_Result ret; |
103 | int comp; | 103 | enum MHD_Result comp; |
104 | size_t body_len; | 104 | size_t body_len; |
105 | char *body_str; | 105 | char *body_str; |
106 | (void) cls; /* Unused. Silent compiler warning. */ | 106 | (void) cls; /* Unused. Silent compiler warning. */ |
diff --git a/src/examples/https_fileserver_example.c b/src/examples/https_fileserver_example.c index 627bc739..5148c8b6 100644 --- a/src/examples/https_fileserver_example.c +++ b/src/examples/https_fileserver_example.c | |||
@@ -113,7 +113,7 @@ file_free_callback (void *cls) | |||
113 | 113 | ||
114 | 114 | ||
115 | /* HTTP access handler call back */ | 115 | /* HTTP access handler call back */ |
116 | static int | 116 | static enum MHD_Result |
117 | http_ahc (void *cls, | 117 | http_ahc (void *cls, |
118 | struct MHD_Connection *connection, | 118 | struct MHD_Connection *connection, |
119 | const char *url, | 119 | const char *url, |
@@ -124,7 +124,7 @@ http_ahc (void *cls, | |||
124 | { | 124 | { |
125 | static int aptr; | 125 | static int aptr; |
126 | struct MHD_Response *response; | 126 | struct MHD_Response *response; |
127 | int ret; | 127 | enum MHD_Result ret; |
128 | FILE *file; | 128 | FILE *file; |
129 | int fd; | 129 | int fd; |
130 | struct stat buf; | 130 | struct stat buf; |
diff --git a/src/examples/minimal_example.c b/src/examples/minimal_example.c index d6589cf9..a02b5d50 100644 --- a/src/examples/minimal_example.c +++ b/src/examples/minimal_example.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #define PAGE \ | 28 | #define PAGE \ |
29 | "<html><head><title>libmicrohttpd demo</title></head><body>libmicrohttpd demo</body></html>" | 29 | "<html><head><title>libmicrohttpd demo</title></head><body>libmicrohttpd demo</body></html>" |
30 | 30 | ||
31 | static int | 31 | static enum MHD_Result |
32 | ahc_echo (void *cls, | 32 | ahc_echo (void *cls, |
33 | struct MHD_Connection *connection, | 33 | struct MHD_Connection *connection, |
34 | const char *url, | 34 | const char *url, |
@@ -41,7 +41,7 @@ ahc_echo (void *cls, | |||
41 | static int aptr; | 41 | static int aptr; |
42 | const char *me = cls; | 42 | const char *me = cls; |
43 | struct MHD_Response *response; | 43 | struct MHD_Response *response; |
44 | int ret; | 44 | enum MHD_Result ret; |
45 | 45 | ||
46 | (void) url; /* Unused. Silent compiler warning. */ | 46 | (void) url; /* Unused. Silent compiler warning. */ |
47 | (void) version; /* Unused. Silent compiler warning. */ | 47 | (void) version; /* Unused. Silent compiler warning. */ |
diff --git a/src/examples/minimal_example_comet.c b/src/examples/minimal_example_comet.c index 80c4258a..c36bf2ce 100644 --- a/src/examples/minimal_example_comet.c +++ b/src/examples/minimal_example_comet.c | |||
@@ -38,7 +38,7 @@ data_generator (void *cls, uint64_t pos, char *buf, size_t max) | |||
38 | } | 38 | } |
39 | 39 | ||
40 | 40 | ||
41 | static int | 41 | static enum MHD_Result |
42 | ahc_echo (void *cls, | 42 | ahc_echo (void *cls, |
43 | struct MHD_Connection *connection, | 43 | struct MHD_Connection *connection, |
44 | const char *url, | 44 | const char *url, |
@@ -48,7 +48,7 @@ ahc_echo (void *cls, | |||
48 | { | 48 | { |
49 | static int aptr; | 49 | static int aptr; |
50 | struct MHD_Response *response; | 50 | struct MHD_Response *response; |
51 | int ret; | 51 | enum MHD_Result ret; |
52 | (void) cls; /* Unused. Silent compiler warning. */ | 52 | (void) cls; /* Unused. Silent compiler warning. */ |
53 | (void) url; /* Unused. Silent compiler warning. */ | 53 | (void) url; /* Unused. Silent compiler warning. */ |
54 | (void) version; /* Unused. Silent compiler warning. */ | 54 | (void) version; /* Unused. Silent compiler warning. */ |
diff --git a/src/examples/minimal_example_empty.c b/src/examples/minimal_example_empty.c index 2de1cc8b..986a2504 100644 --- a/src/examples/minimal_example_empty.c +++ b/src/examples/minimal_example_empty.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <microhttpd.h> | 26 | #include <microhttpd.h> |
27 | 27 | ||
28 | 28 | ||
29 | static int | 29 | static enum MHD_Result |
30 | ahc_echo (void *cls, | 30 | ahc_echo (void *cls, |
31 | struct MHD_Connection *connection, | 31 | struct MHD_Connection *connection, |
32 | const char *url, | 32 | const char *url, |
@@ -38,7 +38,7 @@ ahc_echo (void *cls, | |||
38 | { | 38 | { |
39 | static int aptr; | 39 | static int aptr; |
40 | struct MHD_Response *response; | 40 | struct MHD_Response *response; |
41 | int ret; | 41 | enum MHD_Result ret; |
42 | 42 | ||
43 | (void) url; /* Unused. Silent compiler warning. */ | 43 | (void) url; /* Unused. Silent compiler warning. */ |
44 | (void) version; /* Unused. Silent compiler warning. */ | 44 | (void) version; /* Unused. Silent compiler warning. */ |
diff --git a/src/examples/minimal_example_empty_tls.c b/src/examples/minimal_example_empty_tls.c index e3daca5f..0b9a0e25 100644 --- a/src/examples/minimal_example_empty_tls.c +++ b/src/examples/minimal_example_empty_tls.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <microhttpd.h> | 26 | #include <microhttpd.h> |
27 | 27 | ||
28 | 28 | ||
29 | static int | 29 | static enum MHD_Result |
30 | ahc_echo (void *cls, | 30 | ahc_echo (void *cls, |
31 | struct MHD_Connection *connection, | 31 | struct MHD_Connection *connection, |
32 | const char *url, | 32 | const char *url, |
@@ -38,7 +38,7 @@ ahc_echo (void *cls, | |||
38 | { | 38 | { |
39 | static int aptr; | 39 | static int aptr; |
40 | struct MHD_Response *response; | 40 | struct MHD_Response *response; |
41 | int ret; | 41 | enum MHD_Result ret; |
42 | 42 | ||
43 | (void) url; /* Unused. Silent compiler warning. */ | 43 | (void) url; /* Unused. Silent compiler warning. */ |
44 | (void) version; /* Unused. Silent compiler warning. */ | 44 | (void) version; /* Unused. Silent compiler warning. */ |
diff --git a/src/examples/post_example.c b/src/examples/post_example.c index 885cdb1a..55ca3aa8 100644 --- a/src/examples/post_example.c +++ b/src/examples/post_example.c | |||
@@ -205,10 +205,10 @@ get_session (struct MHD_Connection *connection) | |||
205 | * @param connection connection to process | 205 | * @param connection connection to process |
206 | * @param MHD_YES on success, MHD_NO on failure | 206 | * @param MHD_YES on success, MHD_NO on failure |
207 | */ | 207 | */ |
208 | typedef int (*PageHandler)(const void *cls, | 208 | typedef enum MHD_Result (*PageHandler)(const void *cls, |
209 | const char *mime, | 209 | const char *mime, |
210 | struct Session *session, | 210 | struct Session *session, |
211 | struct MHD_Connection *connection); | 211 | struct MHD_Connection *connection); |
212 | 212 | ||
213 | 213 | ||
214 | /** | 214 | /** |
@@ -274,13 +274,13 @@ add_session_cookie (struct Session *session, | |||
274 | * @param session session handle | 274 | * @param session session handle |
275 | * @param connection connection to use | 275 | * @param connection connection to use |
276 | */ | 276 | */ |
277 | static int | 277 | static enum MHD_Result |
278 | serve_simple_form (const void *cls, | 278 | serve_simple_form (const void *cls, |
279 | const char *mime, | 279 | const char *mime, |
280 | struct Session *session, | 280 | struct Session *session, |
281 | struct MHD_Connection *connection) | 281 | struct MHD_Connection *connection) |
282 | { | 282 | { |
283 | int ret; | 283 | enum MHD_Result ret; |
284 | const char *form = cls; | 284 | const char *form = cls; |
285 | struct MHD_Response *response; | 285 | struct MHD_Response *response; |
286 | 286 | ||
@@ -310,13 +310,13 @@ serve_simple_form (const void *cls, | |||
310 | * @param session session handle | 310 | * @param session session handle |
311 | * @param connection connection to use | 311 | * @param connection connection to use |
312 | */ | 312 | */ |
313 | static int | 313 | static enum MHD_Result |
314 | fill_v1_form (const void *cls, | 314 | fill_v1_form (const void *cls, |
315 | const char *mime, | 315 | const char *mime, |
316 | struct Session *session, | 316 | struct Session *session, |
317 | struct MHD_Connection *connection) | 317 | struct MHD_Connection *connection) |
318 | { | 318 | { |
319 | int ret; | 319 | enum MHD_Result ret; |
320 | size_t slen; | 320 | size_t slen; |
321 | char *reply; | 321 | char *reply; |
322 | struct MHD_Response *response; | 322 | struct MHD_Response *response; |
@@ -359,13 +359,13 @@ fill_v1_form (const void *cls, | |||
359 | * @param session session handle | 359 | * @param session session handle |
360 | * @param connection connection to use | 360 | * @param connection connection to use |
361 | */ | 361 | */ |
362 | static int | 362 | static enum MHD_Result |
363 | fill_v1_v2_form (const void *cls, | 363 | fill_v1_v2_form (const void *cls, |
364 | const char *mime, | 364 | const char *mime, |
365 | struct Session *session, | 365 | struct Session *session, |
366 | struct MHD_Connection *connection) | 366 | struct MHD_Connection *connection) |
367 | { | 367 | { |
368 | int ret; | 368 | enum MHD_Result ret; |
369 | char *reply; | 369 | char *reply; |
370 | struct MHD_Response *response; | 370 | struct MHD_Response *response; |
371 | size_t slen; | 371 | size_t slen; |
@@ -410,13 +410,13 @@ fill_v1_v2_form (const void *cls, | |||
410 | * @param session session handle | 410 | * @param session session handle |
411 | * @param connection connection to use | 411 | * @param connection connection to use |
412 | */ | 412 | */ |
413 | static int | 413 | static enum MHD_Result |
414 | not_found_page (const void *cls, | 414 | not_found_page (const void *cls, |
415 | const char *mime, | 415 | const char *mime, |
416 | struct Session *session, | 416 | struct Session *session, |
417 | struct MHD_Connection *connection) | 417 | struct MHD_Connection *connection) |
418 | { | 418 | { |
419 | int ret; | 419 | enum MHD_Result ret; |
420 | struct MHD_Response *response; | 420 | struct MHD_Response *response; |
421 | (void) cls; /* Unused. Silent compiler warning. */ | 421 | (void) cls; /* Unused. Silent compiler warning. */ |
422 | (void) session; /* Unused. Silent compiler warning. */ | 422 | (void) session; /* Unused. Silent compiler warning. */ |
@@ -469,7 +469,7 @@ static struct Page pages[] = { | |||
469 | * @return MHD_YES to continue iterating, | 469 | * @return MHD_YES to continue iterating, |
470 | * MHD_NO to abort the iteration | 470 | * MHD_NO to abort the iteration |
471 | */ | 471 | */ |
472 | static int | 472 | static enum MHD_Result |
473 | post_iterator (void *cls, | 473 | post_iterator (void *cls, |
474 | enum MHD_ValueKind kind, | 474 | enum MHD_ValueKind kind, |
475 | const char *key, | 475 | const char *key, |
@@ -554,7 +554,7 @@ post_iterator (void *cls, | |||
554 | * MHS_NO if the socket must be closed due to a serios | 554 | * MHS_NO if the socket must be closed due to a serios |
555 | * error while handling the request | 555 | * error while handling the request |
556 | */ | 556 | */ |
557 | static int | 557 | static enum MHD_Result |
558 | create_response (void *cls, | 558 | create_response (void *cls, |
559 | struct MHD_Connection *connection, | 559 | struct MHD_Connection *connection, |
560 | const char *url, | 560 | const char *url, |
@@ -567,7 +567,7 @@ create_response (void *cls, | |||
567 | struct MHD_Response *response; | 567 | struct MHD_Response *response; |
568 | struct Request *request; | 568 | struct Request *request; |
569 | struct Session *session; | 569 | struct Session *session; |
570 | int ret; | 570 | enum MHD_Result ret; |
571 | unsigned int i; | 571 | unsigned int i; |
572 | (void) cls; /* Unused. Silent compiler warning. */ | 572 | (void) cls; /* Unused. Silent compiler warning. */ |
573 | (void) version; /* Unused. Silent compiler warning. */ | 573 | (void) version; /* Unused. Silent compiler warning. */ |
diff --git a/src/examples/querystring_example.c b/src/examples/querystring_example.c index 8abd8596..4bff891a 100644 --- a/src/examples/querystring_example.c +++ b/src/examples/querystring_example.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #define PAGE \ | 29 | #define PAGE \ |
30 | "<html><head><title>libmicrohttpd demo</title></head><body>Query string for "%s" was "%s"</body></html>" | 30 | "<html><head><title>libmicrohttpd demo</title></head><body>Query string for "%s" was "%s"</body></html>" |
31 | 31 | ||
32 | static int | 32 | static enum MHD_Result |
33 | ahc_echo (void *cls, | 33 | ahc_echo (void *cls, |
34 | struct MHD_Connection *connection, | 34 | struct MHD_Connection *connection, |
35 | const char *url, | 35 | const char *url, |
@@ -42,7 +42,7 @@ ahc_echo (void *cls, | |||
42 | const char *val; | 42 | const char *val; |
43 | char *me; | 43 | char *me; |
44 | struct MHD_Response *response; | 44 | struct MHD_Response *response; |
45 | int ret; | 45 | enum MHD_Result ret; |
46 | (void) url; /* Unused. Silent compiler warning. */ | 46 | (void) url; /* Unused. Silent compiler warning. */ |
47 | (void) version; /* Unused. Silent compiler warning. */ | 47 | (void) version; /* Unused. Silent compiler warning. */ |
48 | (void) upload_data; /* Unused. Silent compiler warning. */ | 48 | (void) upload_data; /* Unused. Silent compiler warning. */ |
diff --git a/src/examples/refuse_post_example.c b/src/examples/refuse_post_example.c index 3a34f36d..7e100d9f 100644 --- a/src/examples/refuse_post_example.c +++ b/src/examples/refuse_post_example.c | |||
@@ -35,7 +35,7 @@ const char *askpage = | |||
35 | #define BUSYPAGE \ | 35 | #define BUSYPAGE \ |
36 | "<html><head><title>Webserver busy</title></head><body>We are too busy to process POSTs right now.</body></html>" | 36 | "<html><head><title>Webserver busy</title></head><body>We are too busy to process POSTs right now.</body></html>" |
37 | 37 | ||
38 | static int | 38 | static enum MHD_Result |
39 | ahc_echo (void *cls, | 39 | ahc_echo (void *cls, |
40 | struct MHD_Connection *connection, | 40 | struct MHD_Connection *connection, |
41 | const char *url, | 41 | const char *url, |
@@ -46,7 +46,7 @@ ahc_echo (void *cls, | |||
46 | static int aptr; | 46 | static int aptr; |
47 | const char *me = cls; | 47 | const char *me = cls; |
48 | struct MHD_Response *response; | 48 | struct MHD_Response *response; |
49 | int ret; | 49 | enum MHD_Result ret; |
50 | (void) cls; /* Unused. Silent compiler warning. */ | 50 | (void) cls; /* Unused. Silent compiler warning. */ |
51 | (void) url; /* Unused. Silent compiler warning. */ | 51 | (void) url; /* Unused. Silent compiler warning. */ |
52 | (void) version; /* Unused. Silent compiler warning. */ | 52 | (void) version; /* Unused. Silent compiler warning. */ |
diff --git a/src/examples/suspend_resume_epoll.c b/src/examples/suspend_resume_epoll.c index a69fdc4a..afa1169c 100644 --- a/src/examples/suspend_resume_epoll.c +++ b/src/examples/suspend_resume_epoll.c | |||
@@ -43,7 +43,7 @@ static int epfd; | |||
43 | static struct epoll_event evt; | 43 | static struct epoll_event evt; |
44 | 44 | ||
45 | 45 | ||
46 | static int | 46 | static enum MHD_Result |
47 | ahc_echo (void *cls, | 47 | ahc_echo (void *cls, |
48 | struct MHD_Connection *connection, | 48 | struct MHD_Connection *connection, |
49 | const char *url, | 49 | const char *url, |
@@ -52,7 +52,7 @@ ahc_echo (void *cls, | |||
52 | const char *upload_data, size_t *upload_data_size, void **ptr) | 52 | const char *upload_data, size_t *upload_data_size, void **ptr) |
53 | { | 53 | { |
54 | struct MHD_Response *response; | 54 | struct MHD_Response *response; |
55 | int ret; | 55 | enum MHD_Result ret; |
56 | struct Request*req; | 56 | struct Request*req; |
57 | struct itimerspec ts; | 57 | struct itimerspec ts; |
58 | 58 | ||
diff --git a/src/examples/timeout.c b/src/examples/timeout.c index cfb66950..b31ff21f 100644 --- a/src/examples/timeout.c +++ b/src/examples/timeout.c | |||
@@ -29,7 +29,7 @@ | |||
29 | 29 | ||
30 | #define PORT 8080 | 30 | #define PORT 8080 |
31 | 31 | ||
32 | static int | 32 | static enum MHD_Result |
33 | answer_to_connection (void *cls, | 33 | answer_to_connection (void *cls, |
34 | struct MHD_Connection *connection, | 34 | struct MHD_Connection *connection, |
35 | const char *url, | 35 | const char *url, |
@@ -41,7 +41,7 @@ answer_to_connection (void *cls, | |||
41 | { | 41 | { |
42 | const char *page = "<html><body>Hello timeout!</body></html>"; | 42 | const char *page = "<html><body>Hello timeout!</body></html>"; |
43 | struct MHD_Response *response; | 43 | struct MHD_Response *response; |
44 | int ret; | 44 | enum MHD_Result ret; |
45 | (void) cls; /* Unused. Silent compiler warning. */ | 45 | (void) cls; /* Unused. Silent compiler warning. */ |
46 | (void) url; /* Unused. Silent compiler warning. */ | 46 | (void) url; /* Unused. Silent compiler warning. */ |
47 | (void) version; /* Unused. Silent compiler warning. */ | 47 | (void) version; /* Unused. Silent compiler warning. */ |
diff --git a/src/examples/upgrade_example.c b/src/examples/upgrade_example.c index 98675e09..85a06646 100644 --- a/src/examples/upgrade_example.c +++ b/src/examples/upgrade_example.c | |||
@@ -240,7 +240,7 @@ uh_cb (void *cls, | |||
240 | } | 240 | } |
241 | 241 | ||
242 | 242 | ||
243 | static int | 243 | static enum MHD_Result |
244 | ahc_echo (void *cls, | 244 | ahc_echo (void *cls, |
245 | struct MHD_Connection *connection, | 245 | struct MHD_Connection *connection, |
246 | const char *url, | 246 | const char *url, |
@@ -252,7 +252,7 @@ ahc_echo (void *cls, | |||
252 | { | 252 | { |
253 | static int aptr; | 253 | static int aptr; |
254 | struct MHD_Response *response; | 254 | struct MHD_Response *response; |
255 | int ret; | 255 | enum MHD_Result ret; |
256 | (void) cls; /* Unused. Silent compiler warning. */ | 256 | (void) cls; /* Unused. Silent compiler warning. */ |
257 | (void) url; /* Unused. Silent compiler warning. */ | 257 | (void) url; /* Unused. Silent compiler warning. */ |
258 | (void) version; /* Unused. Silent compiler warning. */ | 258 | (void) version; /* Unused. Silent compiler warning. */ |
diff --git a/src/microhttpd/test_daemon.c b/src/microhttpd/test_daemon.c index 4f600ef0..430c8e18 100644 --- a/src/microhttpd/test_daemon.c +++ b/src/microhttpd/test_daemon.c | |||
@@ -52,7 +52,7 @@ testStartError () | |||
52 | } | 52 | } |
53 | 53 | ||
54 | 54 | ||
55 | static int | 55 | static enum MHD_Result |
56 | apc_nothing (void *cls, | 56 | apc_nothing (void *cls, |
57 | const struct sockaddr *addr, | 57 | const struct sockaddr *addr, |
58 | socklen_t addrlen) | 58 | socklen_t addrlen) |
@@ -63,7 +63,7 @@ apc_nothing (void *cls, | |||
63 | } | 63 | } |
64 | 64 | ||
65 | 65 | ||
66 | static int | 66 | static enum MHD_Result |
67 | apc_all (void *cls, | 67 | apc_all (void *cls, |
68 | const struct sockaddr *addr, | 68 | const struct sockaddr *addr, |
69 | socklen_t addrlen) | 69 | socklen_t addrlen) |
@@ -74,7 +74,7 @@ apc_all (void *cls, | |||
74 | } | 74 | } |
75 | 75 | ||
76 | 76 | ||
77 | static int | 77 | static enum MHD_Result |
78 | ahc_nothing (void *cls, | 78 | ahc_nothing (void *cls, |
79 | struct MHD_Connection *connection, | 79 | struct MHD_Connection *connection, |
80 | const char *url, | 80 | const char *url, |
diff --git a/src/microhttpd/test_postprocessor.c b/src/microhttpd/test_postprocessor.c index 2c37565c..e70171cc 100644 --- a/src/microhttpd/test_postprocessor.c +++ b/src/microhttpd/test_postprocessor.c | |||
@@ -92,7 +92,7 @@ mismatch (const char *a, const char *b) | |||
92 | } | 92 | } |
93 | 93 | ||
94 | 94 | ||
95 | static int | 95 | static enum MHD_Result |
96 | value_checker (void *cls, | 96 | value_checker (void *cls, |
97 | enum MHD_ValueKind kind, | 97 | enum MHD_ValueKind kind, |
98 | const char *key, | 98 | const char *key, |
@@ -140,10 +140,10 @@ value_checker (void *cls, | |||
140 | fprintf (stderr, | 140 | fprintf (stderr, |
141 | "Wanted: `%s' `%s' `%s' `%s' `%s'\n", | 141 | "Wanted: `%s' `%s' `%s' `%s' `%s'\n", |
142 | want[idx], | 142 | want[idx], |
143 | want[idx+1], | 143 | want[idx + 1], |
144 | want[idx+2], | 144 | want[idx + 2], |
145 | want[idx+3], | 145 | want[idx + 3], |
146 | want[idx+4]); | 146 | want[idx + 4]); |
147 | fprintf (stderr, | 147 | fprintf (stderr, |
148 | "Unexpected result: %d/%d/%d/%d/%d/%d/%d\n", | 148 | "Unexpected result: %d/%d/%d/%d/%d/%d/%d\n", |
149 | (idx < 0), | 149 | (idx < 0), |
@@ -155,7 +155,7 @@ value_checker (void *cls, | |||
155 | (0 != memcmp (data, &want[idx + 4][off], size))); | 155 | (0 != memcmp (data, &want[idx + 4][off], size))); |
156 | return MHD_NO; | 156 | return MHD_NO; |
157 | } | 157 | } |
158 | if ( ( (NULL == want[idx+4]) && | 158 | if ( ( (NULL == want[idx + 4]) && |
159 | (0 == off + size) ) || | 159 | (0 == off + size) ) || |
160 | (off + size == strlen (want[idx + 4])) ) | 160 | (off + size == strlen (want[idx + 4])) ) |
161 | *want_off = idx + 5; | 161 | *want_off = idx + 5; |
diff --git a/src/microhttpd/test_postprocessor_amp.c b/src/microhttpd/test_postprocessor_amp.c index 54936979..8692d443 100644 --- a/src/microhttpd/test_postprocessor_amp.c +++ b/src/microhttpd/test_postprocessor_amp.c | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | uint64_t num_errors; | 8 | uint64_t num_errors; |
9 | 9 | ||
10 | int | 10 | enum MHD_Result |
11 | check_post (void *cls, enum MHD_ValueKind kind, const char*key, | 11 | check_post (void *cls, enum MHD_ValueKind kind, const char*key, |
12 | const char*filename, const char*content_type, | 12 | const char*filename, const char*content_type, |
13 | const char*content_encoding, const char*data, | 13 | const char*content_encoding, const char*data, |
diff --git a/src/microhttpd/test_postprocessor_large.c b/src/microhttpd/test_postprocessor_large.c index 0e2a10d2..678de808 100644 --- a/src/microhttpd/test_postprocessor_large.c +++ b/src/microhttpd/test_postprocessor_large.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <unistd.h> | 33 | #include <unistd.h> |
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | static int | 36 | static enum MHD_Result |
37 | value_checker (void *cls, | 37 | value_checker (void *cls, |
38 | enum MHD_ValueKind kind, | 38 | enum MHD_ValueKind kind, |
39 | const char *key, | 39 | const char *key, |
diff --git a/src/microhttpd/test_upgrade.c b/src/microhttpd/test_upgrade.c index 404c2854..b3aecafa 100644 --- a/src/microhttpd/test_upgrade.c +++ b/src/microhttpd/test_upgrade.c | |||
@@ -843,7 +843,7 @@ upgrade_cb (void *cls, | |||
843 | * #MHD_NO if the socket must be closed due to a serios | 843 | * #MHD_NO if the socket must be closed due to a serios |
844 | * error while handling the request | 844 | * error while handling the request |
845 | */ | 845 | */ |
846 | static int | 846 | static enum MHD_Result |
847 | ahc_upgrade (void *cls, | 847 | ahc_upgrade (void *cls, |
848 | struct MHD_Connection *connection, | 848 | struct MHD_Connection *connection, |
849 | const char *url, | 849 | const char *url, |
@@ -854,7 +854,7 @@ ahc_upgrade (void *cls, | |||
854 | void **con_cls) | 854 | void **con_cls) |
855 | { | 855 | { |
856 | struct MHD_Response *resp; | 856 | struct MHD_Response *resp; |
857 | int ret; | 857 | enum MHD_Result ret; |
858 | (void) cls; | 858 | (void) cls; |
859 | (void) url; | 859 | (void) url; |
860 | (void) method; /* Unused. Silent compiler warning. */ | 860 | (void) method; /* Unused. Silent compiler warning. */ |
diff --git a/src/microhttpd/test_upgrade_large.c b/src/microhttpd/test_upgrade_large.c index a17293db..d8d35838 100644 --- a/src/microhttpd/test_upgrade_large.c +++ b/src/microhttpd/test_upgrade_large.c | |||
@@ -867,7 +867,7 @@ upgrade_cb (void *cls, | |||
867 | * #MHD_NO if the socket must be closed due to a serios | 867 | * #MHD_NO if the socket must be closed due to a serios |
868 | * error while handling the request | 868 | * error while handling the request |
869 | */ | 869 | */ |
870 | static int | 870 | static enum MHD_Result |
871 | ahc_upgrade (void *cls, | 871 | ahc_upgrade (void *cls, |
872 | struct MHD_Connection *connection, | 872 | struct MHD_Connection *connection, |
873 | const char *url, | 873 | const char *url, |
@@ -878,7 +878,7 @@ ahc_upgrade (void *cls, | |||
878 | void **con_cls) | 878 | void **con_cls) |
879 | { | 879 | { |
880 | struct MHD_Response *resp; | 880 | struct MHD_Response *resp; |
881 | int ret; | 881 | enum MHD_Result ret; |
882 | (void) cls; | 882 | (void) cls; |
883 | (void) url; | 883 | (void) url; |
884 | (void) method; /* Unused. Silent compiler warning. */ | 884 | (void) method; /* Unused. Silent compiler warning. */ |
diff --git a/src/testcurl/https/test_empty_response.c b/src/testcurl/https/test_empty_response.c index 6f29fbe5..28430388 100644 --- a/src/testcurl/https/test_empty_response.c +++ b/src/testcurl/https/test_empty_response.c | |||
@@ -38,7 +38,7 @@ extern const char srv_self_signed_cert_pem[]; | |||
38 | 38 | ||
39 | static int oneone; | 39 | static int oneone; |
40 | 40 | ||
41 | static int | 41 | static enum MHD_Result |
42 | ahc_echo (void *cls, | 42 | ahc_echo (void *cls, |
43 | struct MHD_Connection *connection, | 43 | struct MHD_Connection *connection, |
44 | const char *url, | 44 | const char *url, |
@@ -48,7 +48,7 @@ ahc_echo (void *cls, | |||
48 | void **unused) | 48 | void **unused) |
49 | { | 49 | { |
50 | struct MHD_Response *response; | 50 | struct MHD_Response *response; |
51 | int ret; | 51 | enum MHD_Result ret; |
52 | (void) cls; (void) url; (void) method; (void) version; /* Unused. Silent compiler warning. */ | 52 | (void) cls; (void) url; (void) method; (void) version; /* Unused. Silent compiler warning. */ |
53 | (void) upload_data; (void) upload_data_size; (void) unused; /* Unused. Silent compiler warning. */ | 53 | (void) upload_data; (void) upload_data_size; (void) unused; /* Unused. Silent compiler warning. */ |
54 | 54 | ||
diff --git a/src/testcurl/https/test_https_get.c b/src/testcurl/https/test_https_get.c index c012fa46..b8de81a9 100644 --- a/src/testcurl/https/test_https_get.c +++ b/src/testcurl/https/test_https_get.c | |||
@@ -91,7 +91,7 @@ test_secure_get (FILE *test_fd, | |||
91 | } | 91 | } |
92 | 92 | ||
93 | 93 | ||
94 | static int | 94 | static enum MHD_Result |
95 | ahc_empty (void *cls, | 95 | ahc_empty (void *cls, |
96 | struct MHD_Connection *connection, | 96 | struct MHD_Connection *connection, |
97 | const char *url, | 97 | const char *url, |
@@ -103,7 +103,7 @@ ahc_empty (void *cls, | |||
103 | { | 103 | { |
104 | static int ptr; | 104 | static int ptr; |
105 | struct MHD_Response *response; | 105 | struct MHD_Response *response; |
106 | int ret; | 106 | enum MHD_Result ret; |
107 | (void) cls; | 107 | (void) cls; |
108 | (void) url; | 108 | (void) url; |
109 | (void) url; | 109 | (void) url; |
diff --git a/src/testcurl/https/test_https_get_select.c b/src/testcurl/https/test_https_get_select.c index e5bd73f5..d42f4463 100644 --- a/src/testcurl/https/test_https_get_select.c +++ b/src/testcurl/https/test_https_get_select.c | |||
@@ -39,7 +39,7 @@ extern const char srv_self_signed_cert_pem[]; | |||
39 | 39 | ||
40 | static int oneone; | 40 | static int oneone; |
41 | 41 | ||
42 | static int | 42 | static enum MHD_Result |
43 | ahc_echo (void *cls, | 43 | ahc_echo (void *cls, |
44 | struct MHD_Connection *connection, | 44 | struct MHD_Connection *connection, |
45 | const char *url, | 45 | const char *url, |
@@ -51,7 +51,7 @@ ahc_echo (void *cls, | |||
51 | static int ptr; | 51 | static int ptr; |
52 | const char *me = cls; | 52 | const char *me = cls; |
53 | struct MHD_Response *response; | 53 | struct MHD_Response *response; |
54 | int ret; | 54 | enum MHD_Result ret; |
55 | (void) version; (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ | 55 | (void) version; (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ |
56 | 56 | ||
57 | if (0 != strcmp (me, method)) | 57 | if (0 != strcmp (me, method)) |
diff --git a/src/testcurl/https/test_https_session_info.c b/src/testcurl/https/test_https_session_info.c index e961edc4..f8b37cff 100644 --- a/src/testcurl/https/test_https_session_info.c +++ b/src/testcurl/https/test_https_session_info.c | |||
@@ -41,14 +41,15 @@ struct MHD_Daemon *d; | |||
41 | * HTTP access handler call back | 41 | * HTTP access handler call back |
42 | * used to query negotiated security parameters | 42 | * used to query negotiated security parameters |
43 | */ | 43 | */ |
44 | static int | 44 | static enum MHD_Result |
45 | query_session_ahc (void *cls, struct MHD_Connection *connection, | 45 | query_session_ahc (void *cls, struct MHD_Connection *connection, |
46 | const char *url, const char *method, | 46 | const char *url, const char *method, |
47 | const char *version, const char *upload_data, | 47 | const char *version, const char *upload_data, |
48 | size_t *upload_data_size, void **ptr) | 48 | size_t *upload_data_size, void **ptr) |
49 | { | 49 | { |
50 | struct MHD_Response *response; | 50 | struct MHD_Response *response; |
51 | int ret; | 51 | enum MHD_Result ret; |
52 | int gret; | ||
52 | (void) cls; (void) url; (void) method; (void) version; /* Unused. Silent compiler warning. */ | 53 | (void) cls; (void) url; (void) method; (void) version; /* Unused. Silent compiler warning. */ |
53 | (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ | 54 | (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ |
54 | 55 | ||
@@ -59,11 +60,11 @@ query_session_ahc (void *cls, struct MHD_Connection *connection, | |||
59 | } | 60 | } |
60 | 61 | ||
61 | if (GNUTLS_TLS1_1 != | 62 | if (GNUTLS_TLS1_1 != |
62 | (ret = MHD_get_connection_info | 63 | (gret = MHD_get_connection_info |
63 | (connection, | 64 | (connection, |
64 | MHD_CONNECTION_INFO_PROTOCOL)->protocol)) | 65 | MHD_CONNECTION_INFO_PROTOCOL)->protocol)) |
65 | { | 66 | { |
66 | if (GNUTLS_TLS1_2 == ret) | 67 | if (GNUTLS_TLS1_2 == gret) |
67 | { | 68 | { |
68 | /* as usual, TLS implementations sometimes don't | 69 | /* as usual, TLS implementations sometimes don't |
69 | quite do what was asked, just mildly complain... */ | 70 | quite do what was asked, just mildly complain... */ |
@@ -76,8 +77,8 @@ query_session_ahc (void *cls, struct MHD_Connection *connection, | |||
76 | fprintf (stderr, | 77 | fprintf (stderr, |
77 | "Error: requested protocol mismatch (wanted %d, got %d)\n", | 78 | "Error: requested protocol mismatch (wanted %d, got %d)\n", |
78 | GNUTLS_TLS1_1, | 79 | GNUTLS_TLS1_1, |
79 | ret); | 80 | gret); |
80 | return -1; | 81 | return MHD_NO; |
81 | } | 82 | } |
82 | } | 83 | } |
83 | 84 | ||
diff --git a/src/testcurl/https/tls_test_common.c b/src/testcurl/https/tls_test_common.c index f68f5979..a704be5f 100644 --- a/src/testcurl/https/tls_test_common.c +++ b/src/testcurl/https/tls_test_common.c | |||
@@ -176,7 +176,7 @@ copyBuffer (void *ptr, | |||
176 | /** | 176 | /** |
177 | * HTTP access handler call back | 177 | * HTTP access handler call back |
178 | */ | 178 | */ |
179 | int | 179 | enum MHD_Result |
180 | http_ahc (void *cls, | 180 | http_ahc (void *cls, |
181 | struct MHD_Connection *connection, | 181 | struct MHD_Connection *connection, |
182 | const char *url, | 182 | const char *url, |
@@ -188,7 +188,7 @@ http_ahc (void *cls, | |||
188 | { | 188 | { |
189 | static int aptr; | 189 | static int aptr; |
190 | struct MHD_Response *response; | 190 | struct MHD_Response *response; |
191 | int ret; | 191 | enum MHD_Result ret; |
192 | (void) cls; (void) url; (void) version; /* Unused. Silent compiler warning. */ | 192 | (void) cls; (void) url; (void) version; /* Unused. Silent compiler warning. */ |
193 | (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ | 193 | (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ |
194 | 194 | ||
@@ -211,7 +211,7 @@ http_ahc (void *cls, | |||
211 | 211 | ||
212 | 212 | ||
213 | /* HTTP access handler call back */ | 213 | /* HTTP access handler call back */ |
214 | int | 214 | enum MHD_Result |
215 | http_dummy_ahc (void *cls, | 215 | http_dummy_ahc (void *cls, |
216 | struct MHD_Connection *connection, | 216 | struct MHD_Connection *connection, |
217 | const char *url, | 217 | const char *url, |
diff --git a/src/testcurl/https/tls_test_common.h b/src/testcurl/https/tls_test_common.h index 36f5ffa5..fd2a47b1 100644 --- a/src/testcurl/https/tls_test_common.h +++ b/src/testcurl/https/tls_test_common.h | |||
@@ -95,12 +95,12 @@ print_test_result (int test_outcome, char *test_name); | |||
95 | size_t | 95 | size_t |
96 | copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx); | 96 | copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx); |
97 | 97 | ||
98 | int | 98 | enum MHD_Result |
99 | http_ahc (void *cls, struct MHD_Connection *connection, | 99 | http_ahc (void *cls, struct MHD_Connection *connection, |
100 | const char *url, const char *method, const char *upload_data, | 100 | const char *url, const char *method, const char *upload_data, |
101 | const char *version, size_t *upload_data_size, void **ptr); | 101 | const char *version, size_t *upload_data_size, void **ptr); |
102 | 102 | ||
103 | int | 103 | enum MHD_Result |
104 | http_dummy_ahc (void *cls, struct MHD_Connection *connection, | 104 | http_dummy_ahc (void *cls, struct MHD_Connection *connection, |
105 | const char *url, const char *method, const char *upload_data, | 105 | const char *url, const char *method, const char *upload_data, |
106 | const char *version, size_t *upload_data_size, | 106 | const char *version, size_t *upload_data_size, |
diff --git a/src/testcurl/perf_get.c b/src/testcurl/perf_get.c index 53992b17..eb33ea0c 100644 --- a/src/testcurl/perf_get.c +++ b/src/testcurl/perf_get.c | |||
@@ -151,7 +151,7 @@ copyBuffer (void *ptr, | |||
151 | } | 151 | } |
152 | 152 | ||
153 | 153 | ||
154 | static int | 154 | static enum MHD_Result |
155 | ahc_echo (void *cls, | 155 | ahc_echo (void *cls, |
156 | struct MHD_Connection *connection, | 156 | struct MHD_Connection *connection, |
157 | const char *url, | 157 | const char *url, |
@@ -162,7 +162,7 @@ ahc_echo (void *cls, | |||
162 | { | 162 | { |
163 | static int ptr; | 163 | static int ptr; |
164 | const char *me = cls; | 164 | const char *me = cls; |
165 | int ret; | 165 | enum MHD_Result ret; |
166 | (void) url; (void) version; /* Unused. Silent compiler warning. */ | 166 | (void) url; (void) version; /* Unused. Silent compiler warning. */ |
167 | (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ | 167 | (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ |
168 | 168 | ||
diff --git a/src/testcurl/perf_get_concurrent.c b/src/testcurl/perf_get_concurrent.c index 12c57dae..0471143c 100644 --- a/src/testcurl/perf_get_concurrent.c +++ b/src/testcurl/perf_get_concurrent.c | |||
@@ -146,7 +146,7 @@ copyBuffer (void *ptr, | |||
146 | } | 146 | } |
147 | 147 | ||
148 | 148 | ||
149 | static int | 149 | static enum MHD_Result |
150 | ahc_echo (void *cls, | 150 | ahc_echo (void *cls, |
151 | struct MHD_Connection *connection, | 151 | struct MHD_Connection *connection, |
152 | const char *url, | 152 | const char *url, |
@@ -157,7 +157,7 @@ ahc_echo (void *cls, | |||
157 | { | 157 | { |
158 | static int ptr; | 158 | static int ptr; |
159 | const char *me = cls; | 159 | const char *me = cls; |
160 | int ret; | 160 | enum MHD_Result ret; |
161 | (void) url; (void) version; /* Unused. Silent compiler warning. */ | 161 | (void) url; (void) version; /* Unused. Silent compiler warning. */ |
162 | (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ | 162 | (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ |
163 | 163 | ||
diff --git a/src/testcurl/test_callback.c b/src/testcurl/test_callback.c index 2e2be470..d9dfecef 100644 --- a/src/testcurl/test_callback.c +++ b/src/testcurl/test_callback.c | |||
@@ -58,7 +58,7 @@ called_twice (void *cls, uint64_t pos, char *buf, size_t max) | |||
58 | } | 58 | } |
59 | 59 | ||
60 | 60 | ||
61 | static int | 61 | static enum MHD_Result |
62 | callback (void *cls, | 62 | callback (void *cls, |
63 | struct MHD_Connection *connection, | 63 | struct MHD_Connection *connection, |
64 | const char *url, | 64 | const char *url, |
@@ -70,7 +70,7 @@ callback (void *cls, | |||
70 | { | 70 | { |
71 | struct callback_closure *cbc = calloc (1, sizeof(struct callback_closure)); | 71 | struct callback_closure *cbc = calloc (1, sizeof(struct callback_closure)); |
72 | struct MHD_Response *r; | 72 | struct MHD_Response *r; |
73 | int ret; | 73 | enum MHD_Result ret; |
74 | 74 | ||
75 | (void) cls; | 75 | (void) cls; |
76 | (void) url; /* Unused. Silent compiler warning. */ | 76 | (void) url; /* Unused. Silent compiler warning. */ |
diff --git a/src/testcurl/test_concurrent_stop.c b/src/testcurl/test_concurrent_stop.c index 750fddc8..6716f491 100644 --- a/src/testcurl/test_concurrent_stop.c +++ b/src/testcurl/test_concurrent_stop.c | |||
@@ -134,7 +134,7 @@ copyBuffer (void *ptr, | |||
134 | } | 134 | } |
135 | 135 | ||
136 | 136 | ||
137 | static int | 137 | static enum MHD_Result |
138 | ahc_echo (void *cls, | 138 | ahc_echo (void *cls, |
139 | struct MHD_Connection *connection, | 139 | struct MHD_Connection *connection, |
140 | const char *url, | 140 | const char *url, |
@@ -146,7 +146,7 @@ ahc_echo (void *cls, | |||
146 | { | 146 | { |
147 | static int ptr; | 147 | static int ptr; |
148 | const char *me = cls; | 148 | const char *me = cls; |
149 | int ret; | 149 | enum MHD_Result ret; |
150 | (void) url; (void) version; /* Unused. Silent compiler warning. */ | 150 | (void) url; (void) version; /* Unused. Silent compiler warning. */ |
151 | (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ | 151 | (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ |
152 | 152 | ||
diff --git a/src/testcurl/test_delete.c b/src/testcurl/test_delete.c index 8854cde7..ae62311b 100644 --- a/src/testcurl/test_delete.c +++ b/src/testcurl/test_delete.c | |||
@@ -81,7 +81,7 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
81 | } | 81 | } |
82 | 82 | ||
83 | 83 | ||
84 | static int | 84 | static enum MHD_Result |
85 | ahc_echo (void *cls, | 85 | ahc_echo (void *cls, |
86 | struct MHD_Connection *connection, | 86 | struct MHD_Connection *connection, |
87 | const char *url, | 87 | const char *url, |
@@ -92,7 +92,7 @@ ahc_echo (void *cls, | |||
92 | { | 92 | { |
93 | int *done = cls; | 93 | int *done = cls; |
94 | struct MHD_Response *response; | 94 | struct MHD_Response *response; |
95 | int ret; | 95 | enum MHD_Result ret; |
96 | (void) version; (void) unused; /* Unused. Silent compiler warning. */ | 96 | (void) version; (void) unused; /* Unused. Silent compiler warning. */ |
97 | 97 | ||
98 | if (0 != strcasecmp ("DELETE", method)) | 98 | if (0 != strcasecmp ("DELETE", method)) |
diff --git a/src/testcurl/test_digestauth.c b/src/testcurl/test_digestauth.c index 4de006b7..9b33eb9b 100644 --- a/src/testcurl/test_digestauth.c +++ b/src/testcurl/test_digestauth.c | |||
@@ -76,7 +76,7 @@ copyBuffer (void *ptr, | |||
76 | } | 76 | } |
77 | 77 | ||
78 | 78 | ||
79 | static int | 79 | static enum MHD_Result |
80 | ahc_echo (void *cls, | 80 | ahc_echo (void *cls, |
81 | struct MHD_Connection *connection, | 81 | struct MHD_Connection *connection, |
82 | const char *url, | 82 | const char *url, |
@@ -90,7 +90,7 @@ ahc_echo (void *cls, | |||
90 | char *username; | 90 | char *username; |
91 | const char *password = "testpass"; | 91 | const char *password = "testpass"; |
92 | const char *realm = "test@example.com"; | 92 | const char *realm = "test@example.com"; |
93 | int ret; | 93 | enum MHD_Result ret; |
94 | (void) cls; (void) url; /* Unused. Silent compiler warning. */ | 94 | (void) cls; (void) url; /* Unused. Silent compiler warning. */ |
95 | (void) method; (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ | 95 | (void) method; (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ |
96 | (void) upload_data_size; (void) unused; /* Unused. Silent compiler warning. */ | 96 | (void) upload_data_size; (void) unused; /* Unused. Silent compiler warning. */ |
diff --git a/src/testcurl/test_digestauth_sha256.c b/src/testcurl/test_digestauth_sha256.c index 3482d14d..ffeabd0c 100644 --- a/src/testcurl/test_digestauth_sha256.c +++ b/src/testcurl/test_digestauth_sha256.c | |||
@@ -77,7 +77,7 @@ copyBuffer (void *ptr, | |||
77 | } | 77 | } |
78 | 78 | ||
79 | 79 | ||
80 | static int | 80 | static enum MHD_Result |
81 | ahc_echo (void *cls, | 81 | ahc_echo (void *cls, |
82 | struct MHD_Connection *connection, | 82 | struct MHD_Connection *connection, |
83 | const char *url, | 83 | const char *url, |
@@ -91,7 +91,7 @@ ahc_echo (void *cls, | |||
91 | char *username; | 91 | char *username; |
92 | const char *password = "testpass"; | 92 | const char *password = "testpass"; |
93 | const char *realm = "test@example.com"; | 93 | const char *realm = "test@example.com"; |
94 | int ret; | 94 | enum MHD_Result ret; |
95 | (void) cls; (void) url; /* Unused. Silent compiler warning. */ | 95 | (void) cls; (void) url; /* Unused. Silent compiler warning. */ |
96 | (void) method; (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ | 96 | (void) method; (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ |
97 | (void) upload_data_size; (void) unused; /* Unused. Silent compiler warning. */ | 97 | (void) upload_data_size; (void) unused; /* Unused. Silent compiler warning. */ |
diff --git a/src/testcurl/test_digestauth_with_arguments.c b/src/testcurl/test_digestauth_with_arguments.c index f1927d1a..70d5f644 100644 --- a/src/testcurl/test_digestauth_with_arguments.c +++ b/src/testcurl/test_digestauth_with_arguments.c | |||
@@ -71,7 +71,7 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
71 | } | 71 | } |
72 | 72 | ||
73 | 73 | ||
74 | static int | 74 | static enum MHD_Result |
75 | ahc_echo (void *cls, | 75 | ahc_echo (void *cls, |
76 | struct MHD_Connection *connection, | 76 | struct MHD_Connection *connection, |
77 | const char *url, | 77 | const char *url, |
@@ -84,7 +84,7 @@ ahc_echo (void *cls, | |||
84 | char *username; | 84 | char *username; |
85 | const char *password = "testpass"; | 85 | const char *password = "testpass"; |
86 | const char *realm = "test@example.com"; | 86 | const char *realm = "test@example.com"; |
87 | int ret; | 87 | enum MHD_Result ret; |
88 | (void) cls; (void) url; /* Unused. Silent compiler warning. */ | 88 | (void) cls; (void) url; /* Unused. Silent compiler warning. */ |
89 | (void) method; (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ | 89 | (void) method; (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ |
90 | (void) upload_data_size; (void) unused; /* Unused. Silent compiler warning. */ | 90 | (void) upload_data_size; (void) unused; /* Unused. Silent compiler warning. */ |
diff --git a/src/testcurl/test_get.c b/src/testcurl/test_get.c index 3ab05d9a..91efdefd 100644 --- a/src/testcurl/test_get.c +++ b/src/testcurl/test_get.c | |||
@@ -98,7 +98,7 @@ log_cb (void *cls, | |||
98 | } | 98 | } |
99 | 99 | ||
100 | 100 | ||
101 | static int | 101 | static enum MHD_Result |
102 | ahc_echo (void *cls, | 102 | ahc_echo (void *cls, |
103 | struct MHD_Connection *connection, | 103 | struct MHD_Connection *connection, |
104 | const char *url, | 104 | const char *url, |
@@ -110,7 +110,7 @@ ahc_echo (void *cls, | |||
110 | static int ptr; | 110 | static int ptr; |
111 | const char *me = cls; | 111 | const char *me = cls; |
112 | struct MHD_Response *response; | 112 | struct MHD_Response *response; |
113 | int ret; | 113 | enum MHD_Result ret; |
114 | const char *v; | 114 | const char *v; |
115 | (void) version; | 115 | (void) version; |
116 | (void) upload_data; | 116 | (void) upload_data; |
@@ -714,7 +714,7 @@ testStopRace (int poll_flag) | |||
714 | } | 714 | } |
715 | 715 | ||
716 | 716 | ||
717 | static int | 717 | static enum MHD_Result |
718 | ahc_empty (void *cls, | 718 | ahc_empty (void *cls, |
719 | struct MHD_Connection *connection, | 719 | struct MHD_Connection *connection, |
720 | const char *url, | 720 | const char *url, |
@@ -726,7 +726,7 @@ ahc_empty (void *cls, | |||
726 | { | 726 | { |
727 | static int ptr; | 727 | static int ptr; |
728 | struct MHD_Response *response; | 728 | struct MHD_Response *response; |
729 | int ret; | 729 | enum MHD_Result ret; |
730 | (void) cls; | 730 | (void) cls; |
731 | (void) url; | 731 | (void) url; |
732 | (void) url; | 732 | (void) url; |
diff --git a/src/testcurl/test_get_chunked.c b/src/testcurl/test_get_chunked.c index 7be1db60..aa60e2f8 100644 --- a/src/testcurl/test_get_chunked.c +++ b/src/testcurl/test_get_chunked.c | |||
@@ -106,7 +106,7 @@ crcf (void *ptr) | |||
106 | } | 106 | } |
107 | 107 | ||
108 | 108 | ||
109 | static int | 109 | static enum MHD_Result |
110 | ahc_echo (void *cls, | 110 | ahc_echo (void *cls, |
111 | struct MHD_Connection *connection, | 111 | struct MHD_Connection *connection, |
112 | const char *url, | 112 | const char *url, |
@@ -118,7 +118,7 @@ ahc_echo (void *cls, | |||
118 | const char *me = cls; | 118 | const char *me = cls; |
119 | struct MHD_Response *response; | 119 | struct MHD_Response *response; |
120 | struct MHD_Response **responseptr; | 120 | struct MHD_Response **responseptr; |
121 | int ret; | 121 | enum MHD_Result ret; |
122 | 122 | ||
123 | (void) url; | 123 | (void) url; |
124 | (void) version; /* Unused. Silent compiler warning. */ | 124 | (void) version; /* Unused. Silent compiler warning. */ |
diff --git a/src/testcurl/test_get_response_cleanup.c b/src/testcurl/test_get_response_cleanup.c index 14c2f240..026fd254 100644 --- a/src/testcurl/test_get_response_cleanup.c +++ b/src/testcurl/test_get_response_cleanup.c | |||
@@ -116,7 +116,7 @@ push_free_callback (void *cls) | |||
116 | } | 116 | } |
117 | 117 | ||
118 | 118 | ||
119 | static int | 119 | static enum MHD_Result |
120 | ahc_echo (void *cls, | 120 | ahc_echo (void *cls, |
121 | struct MHD_Connection *connection, | 121 | struct MHD_Connection *connection, |
122 | const char *url, | 122 | const char *url, |
@@ -128,7 +128,7 @@ ahc_echo (void *cls, | |||
128 | static int ptr; | 128 | static int ptr; |
129 | const char *me = cls; | 129 | const char *me = cls; |
130 | struct MHD_Response *response; | 130 | struct MHD_Response *response; |
131 | int ret; | 131 | enum MHD_Result ret; |
132 | (void) url; (void) version; /* Unused. Silent compiler warning. */ | 132 | (void) url; (void) version; /* Unused. Silent compiler warning. */ |
133 | (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ | 133 | (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ |
134 | 134 | ||
diff --git a/src/testcurl/test_get_sendfile.c b/src/testcurl/test_get_sendfile.c index ad102f0b..0095731e 100644 --- a/src/testcurl/test_get_sendfile.c +++ b/src/testcurl/test_get_sendfile.c | |||
@@ -75,7 +75,7 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
75 | } | 75 | } |
76 | 76 | ||
77 | 77 | ||
78 | static int | 78 | static enum MHD_Result |
79 | ahc_echo (void *cls, | 79 | ahc_echo (void *cls, |
80 | struct MHD_Connection *connection, | 80 | struct MHD_Connection *connection, |
81 | const char *url, | 81 | const char *url, |
@@ -87,7 +87,7 @@ ahc_echo (void *cls, | |||
87 | static int ptr; | 87 | static int ptr; |
88 | const char *me = cls; | 88 | const char *me = cls; |
89 | struct MHD_Response *response; | 89 | struct MHD_Response *response; |
90 | int ret; | 90 | enum MHD_Result ret; |
91 | int fd; | 91 | int fd; |
92 | (void) url; (void) version; /* Unused. Silent compiler warning. */ | 92 | (void) url; (void) version; /* Unused. Silent compiler warning. */ |
93 | (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ | 93 | (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ |
@@ -490,7 +490,7 @@ testExternalGet () | |||
490 | if (cbc.pos != strlen (TESTSTR)) | 490 | if (cbc.pos != strlen (TESTSTR)) |
491 | { | 491 | { |
492 | fprintf (stderr, | 492 | fprintf (stderr, |
493 | "Got %.*s instead of %S!\n", | 493 | "Got %.*s instead of %s!\n", |
494 | (int) cbc.pos, | 494 | (int) cbc.pos, |
495 | cbc.buf, | 495 | cbc.buf, |
496 | TESTSTR); | 496 | TESTSTR); |
diff --git a/src/testcurl/test_iplimit.c b/src/testcurl/test_iplimit.c index 60570886..3b61f827 100644 --- a/src/testcurl/test_iplimit.c +++ b/src/testcurl/test_iplimit.c | |||
@@ -74,7 +74,7 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
74 | } | 74 | } |
75 | 75 | ||
76 | 76 | ||
77 | static int | 77 | static enum MHD_Result |
78 | ahc_echo (void *cls, | 78 | ahc_echo (void *cls, |
79 | struct MHD_Connection *connection, | 79 | struct MHD_Connection *connection, |
80 | const char *url, | 80 | const char *url, |
@@ -86,7 +86,7 @@ ahc_echo (void *cls, | |||
86 | static int ptr; | 86 | static int ptr; |
87 | const char *me = cls; | 87 | const char *me = cls; |
88 | struct MHD_Response *response; | 88 | struct MHD_Response *response; |
89 | int ret; | 89 | enum MHD_Result ret; |
90 | (void) version; (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ | 90 | (void) version; (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ |
91 | 91 | ||
92 | if (0 != strcmp (me, method)) | 92 | if (0 != strcmp (me, method)) |
diff --git a/src/testcurl/test_large_put.c b/src/testcurl/test_large_put.c index b52246ef..d93942e4 100644 --- a/src/testcurl/test_large_put.c +++ b/src/testcurl/test_large_put.c | |||
@@ -118,7 +118,7 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
118 | } | 118 | } |
119 | 119 | ||
120 | 120 | ||
121 | static int | 121 | static enum MHD_Result |
122 | ahc_echo (void *cls, | 122 | ahc_echo (void *cls, |
123 | struct MHD_Connection *connection, | 123 | struct MHD_Connection *connection, |
124 | const char *url, | 124 | const char *url, |
@@ -129,7 +129,7 @@ ahc_echo (void *cls, | |||
129 | { | 129 | { |
130 | int *done = cls; | 130 | int *done = cls; |
131 | struct MHD_Response *response; | 131 | struct MHD_Response *response; |
132 | int ret; | 132 | enum MHD_Result ret; |
133 | static size_t processed; | 133 | static size_t processed; |
134 | (void) version; /* Unused. Silent compiler warning. */ | 134 | (void) version; /* Unused. Silent compiler warning. */ |
135 | 135 | ||
diff --git a/src/testcurl/test_long_header.c b/src/testcurl/test_long_header.c index 17d8904b..54030c21 100644 --- a/src/testcurl/test_long_header.c +++ b/src/testcurl/test_long_header.c | |||
@@ -46,7 +46,7 @@ | |||
46 | 46 | ||
47 | static int oneone; | 47 | static int oneone; |
48 | 48 | ||
49 | static int | 49 | static enum MHD_Result |
50 | apc_all (void *cls, const struct sockaddr *addr, socklen_t addrlen) | 50 | apc_all (void *cls, const struct sockaddr *addr, socklen_t addrlen) |
51 | { | 51 | { |
52 | (void) cls; (void) addr; (void) addrlen; /* Unused. Silent compiler warning. */ | 52 | (void) cls; (void) addr; (void) addrlen; /* Unused. Silent compiler warning. */ |
@@ -69,7 +69,7 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
69 | } | 69 | } |
70 | 70 | ||
71 | 71 | ||
72 | static int | 72 | static enum MHD_Result |
73 | ahc_echo (void *cls, | 73 | ahc_echo (void *cls, |
74 | struct MHD_Connection *connection, | 74 | struct MHD_Connection *connection, |
75 | const char *url, | 75 | const char *url, |
@@ -80,7 +80,7 @@ ahc_echo (void *cls, | |||
80 | { | 80 | { |
81 | const char *me = cls; | 81 | const char *me = cls; |
82 | struct MHD_Response *response; | 82 | struct MHD_Response *response; |
83 | int ret; | 83 | enum MHD_Result ret; |
84 | (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ | 84 | (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ |
85 | (void) upload_data_size; (void) unused; /* Unused. Silent compiler warning. */ | 85 | (void) upload_data_size; (void) unused; /* Unused. Silent compiler warning. */ |
86 | 86 | ||
diff --git a/src/testcurl/test_parse_cookies.c b/src/testcurl/test_parse_cookies.c index d4c291ea..8a786cc2 100644 --- a/src/testcurl/test_parse_cookies.c +++ b/src/testcurl/test_parse_cookies.c | |||
@@ -59,7 +59,7 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
59 | } | 59 | } |
60 | 60 | ||
61 | 61 | ||
62 | static int | 62 | static enum MHD_Result |
63 | ahc_echo (void *cls, | 63 | ahc_echo (void *cls, |
64 | struct MHD_Connection *connection, | 64 | struct MHD_Connection *connection, |
65 | const char *url, | 65 | const char *url, |
@@ -71,7 +71,7 @@ ahc_echo (void *cls, | |||
71 | static int ptr; | 71 | static int ptr; |
72 | const char *me = cls; | 72 | const char *me = cls; |
73 | struct MHD_Response *response; | 73 | struct MHD_Response *response; |
74 | int ret; | 74 | enum MHD_Result ret; |
75 | const char *hdr; | 75 | const char *hdr; |
76 | (void) version; (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ | 76 | (void) version; (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ |
77 | 77 | ||
diff --git a/src/testcurl/test_patch.c b/src/testcurl/test_patch.c index 86327b0d..6be3ab30 100644 --- a/src/testcurl/test_patch.c +++ b/src/testcurl/test_patch.c | |||
@@ -81,7 +81,7 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
81 | } | 81 | } |
82 | 82 | ||
83 | 83 | ||
84 | static int | 84 | static enum MHD_Result |
85 | ahc_echo (void *cls, | 85 | ahc_echo (void *cls, |
86 | struct MHD_Connection *connection, | 86 | struct MHD_Connection *connection, |
87 | const char *url, | 87 | const char *url, |
@@ -92,7 +92,7 @@ ahc_echo (void *cls, | |||
92 | { | 92 | { |
93 | int *done = cls; | 93 | int *done = cls; |
94 | struct MHD_Response *response; | 94 | struct MHD_Response *response; |
95 | int ret; | 95 | enum MHD_Result ret; |
96 | (void) version; (void) unused; /* Unused. Silent compiler warning. */ | 96 | (void) version; (void) unused; /* Unused. Silent compiler warning. */ |
97 | 97 | ||
98 | if (0 != strcasecmp ("PATCH", method)) | 98 | if (0 != strcasecmp ("PATCH", method)) |
diff --git a/src/testcurl/test_post.c b/src/testcurl/test_post.c index 97c9bcc9..675f8db6 100644 --- a/src/testcurl/test_post.c +++ b/src/testcurl/test_post.c | |||
@@ -97,7 +97,7 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
97 | * in that it fails to support incremental processing. | 97 | * in that it fails to support incremental processing. |
98 | * (to be fixed in the future) | 98 | * (to be fixed in the future) |
99 | */ | 99 | */ |
100 | static int | 100 | static enum MHD_Result |
101 | post_iterator (void *cls, | 101 | post_iterator (void *cls, |
102 | enum MHD_ValueKind kind, | 102 | enum MHD_ValueKind kind, |
103 | const char *key, | 103 | const char *key, |
@@ -120,7 +120,7 @@ post_iterator (void *cls, | |||
120 | } | 120 | } |
121 | 121 | ||
122 | 122 | ||
123 | static int | 123 | static enum MHD_Result |
124 | ahc_echo (void *cls, | 124 | ahc_echo (void *cls, |
125 | struct MHD_Connection *connection, | 125 | struct MHD_Connection *connection, |
126 | const char *url, | 126 | const char *url, |
@@ -132,7 +132,7 @@ ahc_echo (void *cls, | |||
132 | static int eok; | 132 | static int eok; |
133 | struct MHD_Response *response; | 133 | struct MHD_Response *response; |
134 | struct MHD_PostProcessor *pp; | 134 | struct MHD_PostProcessor *pp; |
135 | int ret; | 135 | enum MHD_Result ret; |
136 | (void) cls; (void) version; /* Unused. Silent compiler warning. */ | 136 | (void) cls; (void) version; /* Unused. Silent compiler warning. */ |
137 | 137 | ||
138 | if (0 != strcasecmp ("POST", method)) | 138 | if (0 != strcasecmp ("POST", method)) |
@@ -562,7 +562,7 @@ testExternalPost () | |||
562 | } | 562 | } |
563 | 563 | ||
564 | 564 | ||
565 | static int | 565 | static enum MHD_Result |
566 | ahc_cancel (void *cls, | 566 | ahc_cancel (void *cls, |
567 | struct MHD_Connection *connection, | 567 | struct MHD_Connection *connection, |
568 | const char *url, | 568 | const char *url, |
@@ -572,7 +572,7 @@ ahc_cancel (void *cls, | |||
572 | void **unused) | 572 | void **unused) |
573 | { | 573 | { |
574 | struct MHD_Response *response; | 574 | struct MHD_Response *response; |
575 | int ret; | 575 | enum MHD_Result ret; |
576 | (void) cls; (void) url; (void) version; /* Unused. Silent compiler warning. */ | 576 | (void) cls; (void) url; (void) version; /* Unused. Silent compiler warning. */ |
577 | (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ | 577 | (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ |
578 | 578 | ||
diff --git a/src/testcurl/test_post_loop.c b/src/testcurl/test_post_loop.c index 38f9de6e..0eaf2730 100644 --- a/src/testcurl/test_post_loop.c +++ b/src/testcurl/test_post_loop.c | |||
@@ -72,7 +72,7 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
72 | } | 72 | } |
73 | 73 | ||
74 | 74 | ||
75 | static int | 75 | static enum MHD_Result |
76 | ahc_echo (void *cls, | 76 | ahc_echo (void *cls, |
77 | struct MHD_Connection *connection, | 77 | struct MHD_Connection *connection, |
78 | const char *url, | 78 | const char *url, |
@@ -83,7 +83,7 @@ ahc_echo (void *cls, | |||
83 | { | 83 | { |
84 | static int marker; | 84 | static int marker; |
85 | struct MHD_Response *response; | 85 | struct MHD_Response *response; |
86 | int ret; | 86 | enum MHD_Result ret; |
87 | (void) cls; (void) url; (void) version; /* Unused. Silent compiler warning. */ | 87 | (void) cls; (void) url; (void) version; /* Unused. Silent compiler warning. */ |
88 | (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ | 88 | (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ |
89 | 89 | ||
diff --git a/src/testcurl/test_postform.c b/src/testcurl/test_postform.c index 25e6d0e4..18a0fc62 100644 --- a/src/testcurl/test_postform.c +++ b/src/testcurl/test_postform.c | |||
@@ -93,7 +93,7 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
93 | * in that it fails to support incremental processing. | 93 | * in that it fails to support incremental processing. |
94 | * (to be fixed in the future) | 94 | * (to be fixed in the future) |
95 | */ | 95 | */ |
96 | static int | 96 | static enum MHD_Result |
97 | post_iterator (void *cls, | 97 | post_iterator (void *cls, |
98 | enum MHD_ValueKind kind, | 98 | enum MHD_ValueKind kind, |
99 | const char *key, | 99 | const char *key, |
@@ -119,7 +119,7 @@ post_iterator (void *cls, | |||
119 | } | 119 | } |
120 | 120 | ||
121 | 121 | ||
122 | static int | 122 | static enum MHD_Result |
123 | ahc_echo (void *cls, | 123 | ahc_echo (void *cls, |
124 | struct MHD_Connection *connection, | 124 | struct MHD_Connection *connection, |
125 | const char *url, | 125 | const char *url, |
@@ -131,7 +131,7 @@ ahc_echo (void *cls, | |||
131 | static int eok; | 131 | static int eok; |
132 | struct MHD_Response *response; | 132 | struct MHD_Response *response; |
133 | struct MHD_PostProcessor *pp; | 133 | struct MHD_PostProcessor *pp; |
134 | int ret; | 134 | enum MHD_Result ret; |
135 | (void) cls; (void) version; /* Unused. Silent compiler warning. */ | 135 | (void) cls; (void) version; /* Unused. Silent compiler warning. */ |
136 | 136 | ||
137 | if (0 != strcmp ("POST", method)) | 137 | if (0 != strcmp ("POST", method)) |
diff --git a/src/testcurl/test_process_arguments.c b/src/testcurl/test_process_arguments.c index dc50396d..f7e03531 100644 --- a/src/testcurl/test_process_arguments.c +++ b/src/testcurl/test_process_arguments.c | |||
@@ -60,7 +60,7 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
60 | } | 60 | } |
61 | 61 | ||
62 | 62 | ||
63 | static int | 63 | static enum MHD_Result |
64 | ahc_echo (void *cls, | 64 | ahc_echo (void *cls, |
65 | struct MHD_Connection *connection, | 65 | struct MHD_Connection *connection, |
66 | const char *url, | 66 | const char *url, |
@@ -72,7 +72,7 @@ ahc_echo (void *cls, | |||
72 | static int ptr; | 72 | static int ptr; |
73 | const char *me = cls; | 73 | const char *me = cls; |
74 | struct MHD_Response *response; | 74 | struct MHD_Response *response; |
75 | int ret; | 75 | enum MHD_Result ret; |
76 | const char *hdr; | 76 | const char *hdr; |
77 | (void) version; (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ | 77 | (void) version; (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ |
78 | 78 | ||
diff --git a/src/testcurl/test_process_headers.c b/src/testcurl/test_process_headers.c index 34200082..5784f5b7 100644 --- a/src/testcurl/test_process_headers.c +++ b/src/testcurl/test_process_headers.c | |||
@@ -66,7 +66,7 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
66 | } | 66 | } |
67 | 67 | ||
68 | 68 | ||
69 | static int | 69 | static enum MHD_Result |
70 | kv_cb (void *cls, enum MHD_ValueKind kind, const char *key, const char *value) | 70 | kv_cb (void *cls, enum MHD_ValueKind kind, const char *key, const char *value) |
71 | { | 71 | { |
72 | if ((0 == strcmp (key, MHD_HTTP_HEADER_HOST)) && | 72 | if ((0 == strcmp (key, MHD_HTTP_HEADER_HOST)) && |
@@ -80,7 +80,7 @@ kv_cb (void *cls, enum MHD_ValueKind kind, const char *key, const char *value) | |||
80 | } | 80 | } |
81 | 81 | ||
82 | 82 | ||
83 | static int | 83 | static enum MHD_Result |
84 | ahc_echo (void *cls, | 84 | ahc_echo (void *cls, |
85 | struct MHD_Connection *connection, | 85 | struct MHD_Connection *connection, |
86 | const char *url, | 86 | const char *url, |
@@ -92,7 +92,7 @@ ahc_echo (void *cls, | |||
92 | static int ptr; | 92 | static int ptr; |
93 | const char *me = cls; | 93 | const char *me = cls; |
94 | struct MHD_Response *response; | 94 | struct MHD_Response *response; |
95 | int ret; | 95 | enum MHD_Result ret; |
96 | const char *hdr; | 96 | const char *hdr; |
97 | (void) version; (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ | 97 | (void) version; (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ |
98 | 98 | ||
diff --git a/src/testcurl/test_put.c b/src/testcurl/test_put.c index 2326310a..c582a418 100644 --- a/src/testcurl/test_put.c +++ b/src/testcurl/test_put.c | |||
@@ -81,7 +81,7 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
81 | } | 81 | } |
82 | 82 | ||
83 | 83 | ||
84 | static int | 84 | static enum MHD_Result |
85 | ahc_echo (void *cls, | 85 | ahc_echo (void *cls, |
86 | struct MHD_Connection *connection, | 86 | struct MHD_Connection *connection, |
87 | const char *url, | 87 | const char *url, |
@@ -92,7 +92,7 @@ ahc_echo (void *cls, | |||
92 | { | 92 | { |
93 | int *done = cls; | 93 | int *done = cls; |
94 | struct MHD_Response *response; | 94 | struct MHD_Response *response; |
95 | int ret; | 95 | enum MHD_Result ret; |
96 | (void) version; (void) unused; /* Unused. Silent compiler warning. */ | 96 | (void) version; (void) unused; /* Unused. Silent compiler warning. */ |
97 | 97 | ||
98 | if (0 != strcasecmp ("PUT", method)) | 98 | if (0 != strcasecmp ("PUT", method)) |
diff --git a/src/testcurl/test_put_chunked.c b/src/testcurl/test_put_chunked.c index 0824b286..e393523d 100644 --- a/src/testcurl/test_put_chunked.c +++ b/src/testcurl/test_put_chunked.c | |||
@@ -81,7 +81,7 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
81 | } | 81 | } |
82 | 82 | ||
83 | 83 | ||
84 | static int | 84 | static enum MHD_Result |
85 | ahc_echo (void *cls, | 85 | ahc_echo (void *cls, |
86 | struct MHD_Connection *connection, | 86 | struct MHD_Connection *connection, |
87 | const char *url, | 87 | const char *url, |
@@ -92,7 +92,7 @@ ahc_echo (void *cls, | |||
92 | { | 92 | { |
93 | int *done = cls; | 93 | int *done = cls; |
94 | struct MHD_Response *response; | 94 | struct MHD_Response *response; |
95 | int ret; | 95 | enum MHD_Result ret; |
96 | int have; | 96 | int have; |
97 | (void) version; (void) unused; /* Unused. Silent compiler warning. */ | 97 | (void) version; (void) unused; /* Unused. Silent compiler warning. */ |
98 | 98 | ||
diff --git a/src/testcurl/test_quiesce.c b/src/testcurl/test_quiesce.c index 8a79a3c4..ac0ade30 100644 --- a/src/testcurl/test_quiesce.c +++ b/src/testcurl/test_quiesce.c | |||
@@ -70,7 +70,7 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
70 | } | 70 | } |
71 | 71 | ||
72 | 72 | ||
73 | static int | 73 | static enum MHD_Result |
74 | ahc_echo (void *cls, | 74 | ahc_echo (void *cls, |
75 | struct MHD_Connection *connection, | 75 | struct MHD_Connection *connection, |
76 | const char *url, | 76 | const char *url, |
@@ -82,7 +82,7 @@ ahc_echo (void *cls, | |||
82 | static int ptr; | 82 | static int ptr; |
83 | const char *me = cls; | 83 | const char *me = cls; |
84 | struct MHD_Response *response; | 84 | struct MHD_Response *response; |
85 | int ret; | 85 | enum MHD_Result ret; |
86 | (void) version; (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ | 86 | (void) version; (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ |
87 | 87 | ||
88 | if (0 != strcmp (me, method)) | 88 | if (0 != strcmp (me, method)) |
diff --git a/src/testcurl/test_quiesce_stream.c b/src/testcurl/test_quiesce_stream.c index cb1e71cb..5a3e601e 100644 --- a/src/testcurl/test_quiesce_stream.c +++ b/src/testcurl/test_quiesce_stream.c | |||
@@ -132,7 +132,7 @@ free_crc_data (void *crc_data) | |||
132 | } | 132 | } |
133 | 133 | ||
134 | 134 | ||
135 | static int | 135 | static enum MHD_Result |
136 | http_AccessHandlerCallback (void *cls, | 136 | http_AccessHandlerCallback (void *cls, |
137 | struct MHD_Connection *connection, | 137 | struct MHD_Connection *connection, |
138 | const char *url, | 138 | const char *url, |
@@ -142,7 +142,7 @@ http_AccessHandlerCallback (void *cls, | |||
142 | size_t *upload_data_size, | 142 | size_t *upload_data_size, |
143 | void **con_cls) | 143 | void **con_cls) |
144 | { | 144 | { |
145 | int ret; | 145 | enum MHD_Result ret; |
146 | (void) cls; (void) url; /* Unused. Silent compiler warning. */ | 146 | (void) cls; (void) url; /* Unused. Silent compiler warning. */ |
147 | (void) method; (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ | 147 | (void) method; (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ |
148 | (void) upload_data_size; /* Unused. Silent compiler warning. */ | 148 | (void) upload_data_size; /* Unused. Silent compiler warning. */ |
diff --git a/src/testcurl/test_termination.c b/src/testcurl/test_termination.c index 17940020..5541ae30 100644 --- a/src/testcurl/test_termination.c +++ b/src/testcurl/test_termination.c | |||
@@ -47,7 +47,7 @@ | |||
47 | #include <windows.h> | 47 | #include <windows.h> |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | static int | 50 | static enum MHD_Result |
51 | connection_handler (void *cls, | 51 | connection_handler (void *cls, |
52 | struct MHD_Connection *connection, | 52 | struct MHD_Connection *connection, |
53 | const char *url, | 53 | const char *url, |
@@ -76,7 +76,7 @@ connection_handler (void *cls, | |||
76 | struct MHD_Response *response = | 76 | struct MHD_Response *response = |
77 | MHD_create_response_from_buffer (strlen ("Response"), "Response", | 77 | MHD_create_response_from_buffer (strlen ("Response"), "Response", |
78 | MHD_RESPMEM_PERSISTENT); | 78 | MHD_RESPMEM_PERSISTENT); |
79 | int ret = MHD_queue_response (connection, MHD_HTTP_OK, response); | 79 | enum MHD_Result ret = MHD_queue_response (connection, MHD_HTTP_OK, response); |
80 | MHD_destroy_response (response); | 80 | MHD_destroy_response (response); |
81 | 81 | ||
82 | return ret; | 82 | return ret; |
diff --git a/src/testcurl/test_timeout.c b/src/testcurl/test_timeout.c index db1c1e6a..018195f4 100644 --- a/src/testcurl/test_timeout.c +++ b/src/testcurl/test_timeout.c | |||
@@ -121,7 +121,7 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
121 | } | 121 | } |
122 | 122 | ||
123 | 123 | ||
124 | static int | 124 | static enum MHD_Result |
125 | ahc_echo (void *cls, | 125 | ahc_echo (void *cls, |
126 | struct MHD_Connection *connection, | 126 | struct MHD_Connection *connection, |
127 | const char *url, | 127 | const char *url, |
@@ -132,7 +132,7 @@ ahc_echo (void *cls, | |||
132 | { | 132 | { |
133 | int *done = cls; | 133 | int *done = cls; |
134 | struct MHD_Response *response; | 134 | struct MHD_Response *response; |
135 | int ret; | 135 | enum MHD_Result ret; |
136 | (void) version; (void) unused; /* Unused. Silent compiler warning. */ | 136 | (void) version; (void) unused; /* Unused. Silent compiler warning. */ |
137 | 137 | ||
138 | if (0 != strcmp ("PUT", method)) | 138 | if (0 != strcmp ("PUT", method)) |
diff --git a/src/testcurl/test_urlparse.c b/src/testcurl/test_urlparse.c index e8770330..d089ab22 100644 --- a/src/testcurl/test_urlparse.c +++ b/src/testcurl/test_urlparse.c | |||
@@ -69,7 +69,7 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
69 | } | 69 | } |
70 | 70 | ||
71 | 71 | ||
72 | static int | 72 | static enum MHD_Result |
73 | test_values (void *cls, | 73 | test_values (void *cls, |
74 | enum MHD_ValueKind kind, | 74 | enum MHD_ValueKind kind, |
75 | const char *key, | 75 | const char *key, |
@@ -89,7 +89,7 @@ test_values (void *cls, | |||
89 | } | 89 | } |
90 | 90 | ||
91 | 91 | ||
92 | static int | 92 | static enum MHD_Result |
93 | ahc_echo (void *cls, | 93 | ahc_echo (void *cls, |
94 | struct MHD_Connection *connection, | 94 | struct MHD_Connection *connection, |
95 | const char *url, | 95 | const char *url, |
@@ -101,7 +101,7 @@ ahc_echo (void *cls, | |||
101 | static int ptr; | 101 | static int ptr; |
102 | const char *me = cls; | 102 | const char *me = cls; |
103 | struct MHD_Response *response; | 103 | struct MHD_Response *response; |
104 | int ret; | 104 | enum MHD_Result ret; |
105 | (void) version; (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ | 105 | (void) version; (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ |
106 | 106 | ||
107 | if (0 != strcmp (me, method)) | 107 | if (0 != strcmp (me, method)) |
diff --git a/src/testzzuf/test_get.c b/src/testzzuf/test_get.c index 83d92ab3..9ef0d4f7 100644 --- a/src/testzzuf/test_get.c +++ b/src/testzzuf/test_get.c | |||
@@ -60,7 +60,7 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
60 | } | 60 | } |
61 | 61 | ||
62 | 62 | ||
63 | static int | 63 | static enum MHD_Result |
64 | ahc_echo (void *cls, | 64 | ahc_echo (void *cls, |
65 | struct MHD_Connection *connection, | 65 | struct MHD_Connection *connection, |
66 | const char *url, | 66 | const char *url, |
@@ -72,7 +72,7 @@ ahc_echo (void *cls, | |||
72 | static int ptr; | 72 | static int ptr; |
73 | const char *me = cls; | 73 | const char *me = cls; |
74 | struct MHD_Response *response; | 74 | struct MHD_Response *response; |
75 | int ret; | 75 | enum MHD_Result ret; |
76 | (void) version; (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ | 76 | (void) version; (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ |
77 | 77 | ||
78 | if (0 != strcmp (me, method)) | 78 | if (0 != strcmp (me, method)) |
diff --git a/src/testzzuf/test_get_chunked.c b/src/testzzuf/test_get_chunked.c index 8ad7dd6b..9a6536c0 100644 --- a/src/testzzuf/test_get_chunked.c +++ b/src/testzzuf/test_get_chunked.c | |||
@@ -89,7 +89,7 @@ crcf (void *ptr) | |||
89 | } | 89 | } |
90 | 90 | ||
91 | 91 | ||
92 | static int | 92 | static enum MHD_Result |
93 | ahc_echo (void *cls, | 93 | ahc_echo (void *cls, |
94 | struct MHD_Connection *connection, | 94 | struct MHD_Connection *connection, |
95 | const char *url, | 95 | const char *url, |
@@ -101,7 +101,7 @@ ahc_echo (void *cls, | |||
101 | const char *me = cls; | 101 | const char *me = cls; |
102 | struct MHD_Response *response; | 102 | struct MHD_Response *response; |
103 | struct MHD_Response **responseptr; | 103 | struct MHD_Response **responseptr; |
104 | int ret; | 104 | enum MHD_Result ret; |
105 | 105 | ||
106 | (void) url; | 106 | (void) url; |
107 | (void) version; /* Unused. Silent compiler warning. */ | 107 | (void) version; /* Unused. Silent compiler warning. */ |
diff --git a/src/testzzuf/test_long_header.c b/src/testzzuf/test_long_header.c index 6595ad4e..add99234 100644 --- a/src/testzzuf/test_long_header.c +++ b/src/testzzuf/test_long_header.c | |||
@@ -47,7 +47,7 @@ | |||
47 | 47 | ||
48 | static int oneone; | 48 | static int oneone; |
49 | 49 | ||
50 | static int | 50 | static enum MHD_Result |
51 | apc_all (void *cls, const struct sockaddr *addr, socklen_t addrlen) | 51 | apc_all (void *cls, const struct sockaddr *addr, socklen_t addrlen) |
52 | { | 52 | { |
53 | (void) cls; (void) addr; (void) addrlen; /* Unused. Silent compiler warning. */ | 53 | (void) cls; (void) addr; (void) addrlen; /* Unused. Silent compiler warning. */ |
@@ -70,7 +70,7 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
70 | } | 70 | } |
71 | 71 | ||
72 | 72 | ||
73 | static int | 73 | static enum MHD_Result |
74 | ahc_echo (void *cls, | 74 | ahc_echo (void *cls, |
75 | struct MHD_Connection *connection, | 75 | struct MHD_Connection *connection, |
76 | const char *url, | 76 | const char *url, |
@@ -81,7 +81,7 @@ ahc_echo (void *cls, | |||
81 | { | 81 | { |
82 | const char *me = cls; | 82 | const char *me = cls; |
83 | struct MHD_Response *response; | 83 | struct MHD_Response *response; |
84 | int ret; | 84 | enum MHD_Result ret; |
85 | (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ | 85 | (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ |
86 | (void) upload_data_size; (void) unused; /* Unused. Silent compiler warning. */ | 86 | (void) upload_data_size; (void) unused; /* Unused. Silent compiler warning. */ |
87 | 87 | ||
@@ -128,6 +128,11 @@ testLongUrlGet () | |||
128 | 128 | ||
129 | c = curl_easy_init (); | 129 | c = curl_easy_init (); |
130 | url = malloc (VERY_LONG); | 130 | url = malloc (VERY_LONG); |
131 | if (NULL == url) | ||
132 | { | ||
133 | zzuf_socat_stop (); | ||
134 | return 1; | ||
135 | } | ||
131 | memset (url, 'a', VERY_LONG); | 136 | memset (url, 'a', VERY_LONG); |
132 | url[VERY_LONG - 1] = '\0'; | 137 | url[VERY_LONG - 1] = '\0'; |
133 | memcpy (url, "http://127.0.0.1:11081/", | 138 | memcpy (url, "http://127.0.0.1:11081/", |
@@ -189,6 +194,12 @@ testLongHeaderGet () | |||
189 | fprintf (stderr, "."); | 194 | fprintf (stderr, "."); |
190 | c = curl_easy_init (); | 195 | c = curl_easy_init (); |
191 | url = malloc (VERY_LONG); | 196 | url = malloc (VERY_LONG); |
197 | if (NULL == url) | ||
198 | { | ||
199 | zzuf_socat_stop (); | ||
200 | curl_easy_cleanup (c); | ||
201 | return 16; | ||
202 | } | ||
192 | memset (url, 'a', VERY_LONG); | 203 | memset (url, 'a', VERY_LONG); |
193 | url[VERY_LONG - 1] = '\0'; | 204 | url[VERY_LONG - 1] = '\0'; |
194 | url[VERY_LONG / 2] = ':'; | 205 | url[VERY_LONG / 2] = ':'; |
diff --git a/src/testzzuf/test_post.c b/src/testzzuf/test_post.c index 637423c8..e3d8512c 100644 --- a/src/testzzuf/test_post.c +++ b/src/testzzuf/test_post.c | |||
@@ -84,7 +84,7 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
84 | * in that it fails to support incremental processing. | 84 | * in that it fails to support incremental processing. |
85 | * (to be fixed in the future) | 85 | * (to be fixed in the future) |
86 | */ | 86 | */ |
87 | static int | 87 | static enum MHD_Result |
88 | post_iterator (void *cls, | 88 | post_iterator (void *cls, |
89 | enum MHD_ValueKind kind, | 89 | enum MHD_ValueKind kind, |
90 | const char *key, | 90 | const char *key, |
@@ -107,7 +107,7 @@ post_iterator (void *cls, | |||
107 | } | 107 | } |
108 | 108 | ||
109 | 109 | ||
110 | static int | 110 | static enum MHD_Result |
111 | ahc_echo (void *cls, | 111 | ahc_echo (void *cls, |
112 | struct MHD_Connection *connection, | 112 | struct MHD_Connection *connection, |
113 | const char *url, | 113 | const char *url, |
@@ -119,7 +119,7 @@ ahc_echo (void *cls, | |||
119 | static int eok; | 119 | static int eok; |
120 | struct MHD_Response *response; | 120 | struct MHD_Response *response; |
121 | struct MHD_PostProcessor *pp; | 121 | struct MHD_PostProcessor *pp; |
122 | int ret; | 122 | enum MHD_Result ret; |
123 | (void) cls; (void) version; /* Unused. Silent compiler warning. */ | 123 | (void) cls; (void) version; /* Unused. Silent compiler warning. */ |
124 | 124 | ||
125 | if (0 != strcmp ("POST", method)) | 125 | if (0 != strcmp ("POST", method)) |
diff --git a/src/testzzuf/test_post_form.c b/src/testzzuf/test_post_form.c index a253b96d..f994ab24 100644 --- a/src/testzzuf/test_post_form.c +++ b/src/testzzuf/test_post_form.c | |||
@@ -82,7 +82,7 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
82 | * in that it fails to support incremental processing. | 82 | * in that it fails to support incremental processing. |
83 | * (to be fixed in the future) | 83 | * (to be fixed in the future) |
84 | */ | 84 | */ |
85 | static int | 85 | static enum MHD_Result |
86 | post_iterator (void *cls, | 86 | post_iterator (void *cls, |
87 | enum MHD_ValueKind kind, | 87 | enum MHD_ValueKind kind, |
88 | const char *key, | 88 | const char *key, |
@@ -110,7 +110,7 @@ post_iterator (void *cls, | |||
110 | } | 110 | } |
111 | 111 | ||
112 | 112 | ||
113 | static int | 113 | static enum MHD_Result |
114 | ahc_echo (void *cls, | 114 | ahc_echo (void *cls, |
115 | struct MHD_Connection *connection, | 115 | struct MHD_Connection *connection, |
116 | const char *url, | 116 | const char *url, |
@@ -122,7 +122,7 @@ ahc_echo (void *cls, | |||
122 | static int eok; | 122 | static int eok; |
123 | struct MHD_Response *response; | 123 | struct MHD_Response *response; |
124 | struct MHD_PostProcessor *pp; | 124 | struct MHD_PostProcessor *pp; |
125 | int ret; | 125 | enum MHD_Result ret; |
126 | (void) cls; (void) version; /* Unused. Silent compiler warning. */ | 126 | (void) cls; (void) version; /* Unused. Silent compiler warning. */ |
127 | 127 | ||
128 | if (0 != strcmp ("POST", method)) | 128 | if (0 != strcmp ("POST", method)) |
diff --git a/src/testzzuf/test_put.c b/src/testzzuf/test_put.c index 2c79c759..4658d0d4 100644 --- a/src/testzzuf/test_put.c +++ b/src/testzzuf/test_put.c | |||
@@ -76,7 +76,7 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
76 | } | 76 | } |
77 | 77 | ||
78 | 78 | ||
79 | static int | 79 | static enum MHD_Result |
80 | ahc_echo (void *cls, | 80 | ahc_echo (void *cls, |
81 | struct MHD_Connection *connection, | 81 | struct MHD_Connection *connection, |
82 | const char *url, | 82 | const char *url, |
@@ -87,7 +87,7 @@ ahc_echo (void *cls, | |||
87 | { | 87 | { |
88 | int *done = cls; | 88 | int *done = cls; |
89 | struct MHD_Response *response; | 89 | struct MHD_Response *response; |
90 | int ret; | 90 | enum MHD_Result ret; |
91 | (void) version; (void) unused; /* Unused. Silent compiler warning. */ | 91 | (void) version; (void) unused; /* Unused. Silent compiler warning. */ |
92 | 92 | ||
93 | if (0 != strcmp ("PUT", method)) | 93 | if (0 != strcmp ("PUT", method)) |
diff --git a/src/testzzuf/test_put_chunked.c b/src/testzzuf/test_put_chunked.c index 29108008..35196843 100644 --- a/src/testzzuf/test_put_chunked.c +++ b/src/testzzuf/test_put_chunked.c | |||
@@ -76,7 +76,7 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
76 | } | 76 | } |
77 | 77 | ||
78 | 78 | ||
79 | static int | 79 | static enum MHD_Result |
80 | ahc_echo (void *cls, | 80 | ahc_echo (void *cls, |
81 | struct MHD_Connection *connection, | 81 | struct MHD_Connection *connection, |
82 | const char *url, | 82 | const char *url, |
@@ -87,7 +87,7 @@ ahc_echo (void *cls, | |||
87 | { | 87 | { |
88 | int *done = cls; | 88 | int *done = cls; |
89 | struct MHD_Response *response; | 89 | struct MHD_Response *response; |
90 | int ret; | 90 | enum MHD_Result ret; |
91 | int have; | 91 | int have; |
92 | (void) version; (void) unused; /* Unused. Silent compiler warning. */ | 92 | (void) version; (void) unused; /* Unused. Silent compiler warning. */ |
93 | 93 | ||
diff --git a/src/testzzuf/test_put_large.c b/src/testzzuf/test_put_large.c index 56b076c5..abda22cb 100644 --- a/src/testzzuf/test_put_large.c +++ b/src/testzzuf/test_put_large.c | |||
@@ -84,7 +84,7 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
84 | } | 84 | } |
85 | 85 | ||
86 | 86 | ||
87 | static int | 87 | static enum MHD_Result |
88 | ahc_echo (void *cls, | 88 | ahc_echo (void *cls, |
89 | struct MHD_Connection *connection, | 89 | struct MHD_Connection *connection, |
90 | const char *url, | 90 | const char *url, |
@@ -95,7 +95,7 @@ ahc_echo (void *cls, | |||
95 | { | 95 | { |
96 | int *done = cls; | 96 | int *done = cls; |
97 | struct MHD_Response *response; | 97 | struct MHD_Response *response; |
98 | int ret; | 98 | enum MHD_Result ret; |
99 | (void) version; (void) unused; /* Unused. Silent compiler warning. */ | 99 | (void) version; (void) unused; /* Unused. Silent compiler warning. */ |
100 | 100 | ||
101 | if (0 != strcmp ("PUT", method)) | 101 | if (0 != strcmp ("PUT", method)) |
@@ -376,6 +376,8 @@ main (int argc, char *const *argv) | |||
376 | if (0 != curl_global_init (CURL_GLOBAL_WIN32)) | 376 | if (0 != curl_global_init (CURL_GLOBAL_WIN32)) |
377 | return 2; | 377 | return 2; |
378 | put_buffer = malloc (PUT_SIZE); | 378 | put_buffer = malloc (PUT_SIZE); |
379 | if (0 == put_buffer) | ||
380 | return 77; | ||
379 | memset (put_buffer, 1, PUT_SIZE); | 381 | memset (put_buffer, 1, PUT_SIZE); |
380 | if (MHD_YES == MHD_is_feature_supported (MHD_FEATURE_THREADS)) | 382 | if (MHD_YES == MHD_is_feature_supported (MHD_FEATURE_THREADS)) |
381 | { | 383 | { |