diff options
Diffstat (limited to 'plugins/check_curl.c')
-rw-r--r-- | plugins/check_curl.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c index d0871c48..da578b55 100644 --- a/plugins/check_curl.c +++ b/plugins/check_curl.c | |||
@@ -239,10 +239,10 @@ void print_help (void); | |||
239 | void print_usage (void); | 239 | void print_usage (void); |
240 | void print_curl_version (void); | 240 | void print_curl_version (void); |
241 | int curlhelp_initwritebuffer (curlhelp_write_curlbuf*); | 241 | int curlhelp_initwritebuffer (curlhelp_write_curlbuf*); |
242 | int curlhelp_buffer_write_callback (void*, size_t , size_t , void*); | 242 | size_t curlhelp_buffer_write_callback(void*, size_t , size_t , void*); |
243 | void curlhelp_freewritebuffer (curlhelp_write_curlbuf*); | 243 | void curlhelp_freewritebuffer (curlhelp_write_curlbuf*); |
244 | int curlhelp_initreadbuffer (curlhelp_read_curlbuf *, const char *, size_t); | 244 | int curlhelp_initreadbuffer (curlhelp_read_curlbuf *, const char *, size_t); |
245 | int curlhelp_buffer_read_callback (void *, size_t , size_t , void *); | 245 | size_t curlhelp_buffer_read_callback(void *, size_t , size_t , void *); |
246 | void curlhelp_freereadbuffer (curlhelp_read_curlbuf *); | 246 | void curlhelp_freereadbuffer (curlhelp_read_curlbuf *); |
247 | curlhelp_ssl_library curlhelp_get_ssl_library (); | 247 | curlhelp_ssl_library curlhelp_get_ssl_library (); |
248 | const char* curlhelp_get_ssl_library_string (curlhelp_ssl_library); | 248 | const char* curlhelp_get_ssl_library_string (curlhelp_ssl_library); |
@@ -485,7 +485,7 @@ check_http (void) | |||
485 | 485 | ||
486 | /* register cleanup function to shut down libcurl properly */ | 486 | /* register cleanup function to shut down libcurl properly */ |
487 | atexit (cleanup); | 487 | atexit (cleanup); |
488 | 488 | ||
489 | if (verbose >= 1) | 489 | if (verbose >= 1) |
490 | handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_VERBOSE, 1), "CURLOPT_VERBOSE"); | 490 | handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_VERBOSE, 1), "CURLOPT_VERBOSE"); |
491 | 491 | ||
@@ -805,7 +805,7 @@ check_http (void) | |||
805 | handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_INFILESIZE, (curl_off_t)strlen (http_post_data)), "CURLOPT_INFILESIZE"); | 805 | handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_INFILESIZE, (curl_off_t)strlen (http_post_data)), "CURLOPT_INFILESIZE"); |
806 | } | 806 | } |
807 | } | 807 | } |
808 | 808 | ||
809 | /* cookie handling */ | 809 | /* cookie handling */ |
810 | if (cookie_jar_file != NULL) { | 810 | if (cookie_jar_file != NULL) { |
811 | handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_COOKIEJAR, cookie_jar_file), "CURLOPT_COOKIEJAR"); | 811 | handle_curl_option_return_code (curl_easy_setopt (curl, CURLOPT_COOKIEJAR, cookie_jar_file), "CURLOPT_COOKIEJAR"); |
@@ -1167,7 +1167,7 @@ GOT_FIRST_CERT: | |||
1167 | else | 1167 | else |
1168 | msg[strlen(msg)-3] = '\0'; | 1168 | msg[strlen(msg)-3] = '\0'; |
1169 | } | 1169 | } |
1170 | 1170 | ||
1171 | /* TODO: separate _() msg and status code: die (result, "HTTP %s: %s\n", state_text(result), msg); */ | 1171 | /* TODO: separate _() msg and status code: die (result, "HTTP %s: %s\n", state_text(result), msg); */ |
1172 | die (result, "HTTP %s: %s %d %s%s%s - %d bytes in %.3f second response time %s|%s\n%s%s", | 1172 | die (result, "HTTP %s: %s %d %s%s%s - %d bytes in %.3f second response time %s|%s\n%s%s", |
1173 | state_text(result), string_statuscode (status_line.http_major, status_line.http_minor), | 1173 | state_text(result), string_statuscode (status_line.http_major, status_line.http_minor), |
@@ -1694,7 +1694,7 @@ process_arguments (int argc, char **argv) | |||
1694 | else { | 1694 | else { |
1695 | max_depth = atoi (optarg); | 1695 | max_depth = atoi (optarg); |
1696 | } | 1696 | } |
1697 | break; | 1697 | break; |
1698 | case 'f': /* onredirect */ | 1698 | case 'f': /* onredirect */ |
1699 | if (!strcmp (optarg, "ok")) | 1699 | if (!strcmp (optarg, "ok")) |
1700 | onredirect = STATE_OK; | 1700 | onredirect = STATE_OK; |
@@ -2171,8 +2171,7 @@ curlhelp_initwritebuffer (curlhelp_write_curlbuf *buf) | |||
2171 | return 0; | 2171 | return 0; |
2172 | } | 2172 | } |
2173 | 2173 | ||
2174 | int | 2174 | size_t curlhelp_buffer_write_callback (void *buffer, size_t size, size_t nmemb, void *stream) |
2175 | curlhelp_buffer_write_callback (void *buffer, size_t size, size_t nmemb, void *stream) | ||
2176 | { | 2175 | { |
2177 | curlhelp_write_curlbuf *buf = (curlhelp_write_curlbuf *)stream; | 2176 | curlhelp_write_curlbuf *buf = (curlhelp_write_curlbuf *)stream; |
2178 | 2177 | ||
@@ -2192,8 +2191,7 @@ curlhelp_buffer_write_callback (void *buffer, size_t size, size_t nmemb, void *s | |||
2192 | return (int)(size * nmemb); | 2191 | return (int)(size * nmemb); |
2193 | } | 2192 | } |
2194 | 2193 | ||
2195 | int | 2194 | size_t curlhelp_buffer_read_callback(void *buffer, size_t size, size_t nmemb, void *stream) |
2196 | curlhelp_buffer_read_callback (void *buffer, size_t size, size_t nmemb, void *stream) | ||
2197 | { | 2195 | { |
2198 | curlhelp_read_curlbuf *buf = (curlhelp_read_curlbuf *)stream; | 2196 | curlhelp_read_curlbuf *buf = (curlhelp_read_curlbuf *)stream; |
2199 | 2197 | ||