diff options
Diffstat (limited to 'src/testcurl/test_termination.c')
-rw-r--r-- | src/testcurl/test_termination.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/testcurl/test_termination.c b/src/testcurl/test_termination.c index 01c4bf59..e32d3322 100644 --- a/src/testcurl/test_termination.c +++ b/src/testcurl/test_termination.c | |||
@@ -57,6 +57,8 @@ connection_handler (void *cls, | |||
57 | void **ptr) | 57 | void **ptr) |
58 | { | 58 | { |
59 | static int i; | 59 | static int i; |
60 | struct MHD_Response *response; | ||
61 | enum MHD_Result ret; | ||
60 | (void) cls; (void) url; /* Unused. Silent compiler warning. */ | 62 | (void) cls; (void) url; /* Unused. Silent compiler warning. */ |
61 | (void) method; (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ | 63 | (void) method; (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ |
62 | (void) upload_data_size; /* Unused. Silent compiler warning. */ | 64 | (void) upload_data_size; /* Unused. Silent compiler warning. */ |
@@ -73,10 +75,10 @@ connection_handler (void *cls, | |||
73 | return MHD_YES; | 75 | return MHD_YES; |
74 | } | 76 | } |
75 | 77 | ||
76 | struct MHD_Response *response = | 78 | response = |
77 | MHD_create_response_from_buffer (strlen ("Response"), "Response", | 79 | MHD_create_response_from_buffer (strlen ("Response"), "Response", |
78 | MHD_RESPMEM_PERSISTENT); | 80 | MHD_RESPMEM_PERSISTENT); |
79 | enum MHD_Result ret = MHD_queue_response (connection, MHD_HTTP_OK, response); | 81 | ret = MHD_queue_response (connection, MHD_HTTP_OK, response); |
80 | MHD_destroy_response (response); | 82 | MHD_destroy_response (response); |
81 | 83 | ||
82 | return ret; | 84 | return ret; |
@@ -98,6 +100,7 @@ main (void) | |||
98 | int port; | 100 | int port; |
99 | char url[255]; | 101 | char url[255]; |
100 | CURL *curl; | 102 | CURL *curl; |
103 | CURLcode success; | ||
101 | 104 | ||
102 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) | 105 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) |
103 | port = 0; | 106 | port = 0; |
@@ -137,7 +140,7 @@ main (void) | |||
137 | curl_easy_setopt (curl, CURLOPT_URL, url); | 140 | curl_easy_setopt (curl, CURLOPT_URL, url); |
138 | curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, write_data); | 141 | curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, write_data); |
139 | 142 | ||
140 | CURLcode success = curl_easy_perform (curl); | 143 | success = curl_easy_perform (curl); |
141 | if (success != 0) | 144 | if (success != 0) |
142 | { | 145 | { |
143 | fprintf (stderr, "CURL Error"); | 146 | fprintf (stderr, "CURL Error"); |