diff options
| -rw-r--r-- | plugins/check_curl.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c index 76dcbfd8..f28bcdfc 100644 --- a/plugins/check_curl.c +++ b/plugins/check_curl.c | |||
| @@ -145,7 +145,6 @@ check_curl_global_state global_state = { | |||
| 145 | .curl = NULL, | 145 | .curl = NULL, |
| 146 | }; | 146 | }; |
| 147 | 147 | ||
| 148 | static long httpReturnCode; | ||
| 149 | static char errbuf[MAX_INPUT_BUFFER]; | 148 | static char errbuf[MAX_INPUT_BUFFER]; |
| 150 | static char msg[DEFAULT_BUFFER_SIZE]; | 149 | static char msg[DEFAULT_BUFFER_SIZE]; |
| 151 | typedef union { | 150 | typedef union { |
| @@ -257,7 +256,6 @@ int main(int argc, char **argv) { | |||
| 257 | 256 | ||
| 258 | #ifdef HAVE_SSL | 257 | #ifdef HAVE_SSL |
| 259 | # ifdef USE_OPENSSL | 258 | # ifdef USE_OPENSSL |
| 260 | |||
| 261 | int verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx) { | 259 | int verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx) { |
| 262 | (void)preverify_ok; | 260 | (void)preverify_ok; |
| 263 | /* TODO: we get all certificates of the chain, so which ones | 261 | /* TODO: we get all certificates of the chain, so which ones |
| @@ -297,7 +295,6 @@ CURLcode sslctxfun(CURL *curl, SSL_CTX *sslctx, void *parm) { | |||
| 297 | 295 | ||
| 298 | return CURLE_OK; | 296 | return CURLE_OK; |
| 299 | } | 297 | } |
| 300 | |||
| 301 | # endif /* USE_OPENSSL */ | 298 | # endif /* USE_OPENSSL */ |
| 302 | #endif /* HAVE_SSL */ | 299 | #endif /* HAVE_SSL */ |
| 303 | 300 | ||
| @@ -1108,11 +1105,12 @@ mp_state_enum check_http(const check_curl_config config, check_curl_working_stat | |||
| 1108 | perfstring); | 1105 | perfstring); |
| 1109 | /* we cannot know the major/minor version here for sure as we cannot parse the first | 1106 | /* we cannot know the major/minor version here for sure as we cannot parse the first |
| 1110 | * line */ | 1107 | * line */ |
| 1111 | die(STATE_CRITICAL, "HTTP CRITICAL HTTP/x.x %ld unknown - %s", httpReturnCode, msg); | 1108 | die(STATE_CRITICAL, "HTTP CRITICAL HTTP/x.x unknown - %s", msg); |
| 1112 | } | 1109 | } |
| 1113 | global_state.status_line_initialized = true; | 1110 | global_state.status_line_initialized = true; |
| 1114 | 1111 | ||
| 1115 | /* get result code from cURL */ | 1112 | /* get result code from cURL */ |
| 1113 | long httpReturnCode; | ||
| 1116 | handle_curl_option_return_code( | 1114 | handle_curl_option_return_code( |
| 1117 | curl_easy_getinfo(global_state.curl, CURLINFO_RESPONSE_CODE, &httpReturnCode), | 1115 | curl_easy_getinfo(global_state.curl, CURLINFO_RESPONSE_CODE, &httpReturnCode), |
| 1118 | "CURLINFO_RESPONSE_CODE"); | 1116 | "CURLINFO_RESPONSE_CODE"); |
