diff options
| author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-09-11 11:24:16 +0200 |
|---|---|---|
| committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-09-11 11:24:16 +0200 |
| commit | 6969f5719268dec6459d9107e11a711dab3a18dd (patch) | |
| tree | 42424c36f4c3ffcb557cee7d6c670a874cd86640 /plugins/check_curl.d/config.h | |
| parent | 977e0a7f8bd3700f8514b1409205296d42216ed9 (diff) | |
| download | monitoring-plugins-6969f5719268dec6459d9107e11a711dab3a18dd.tar.gz | |
check_curl: improve option handling a bit
Diffstat (limited to 'plugins/check_curl.d/config.h')
| -rw-r--r-- | plugins/check_curl.d/config.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/plugins/check_curl.d/config.h b/plugins/check_curl.d/config.h index 25cfeda3..7566b19c 100644 --- a/plugins/check_curl.d/config.h +++ b/plugins/check_curl.d/config.h | |||
| @@ -105,8 +105,10 @@ typedef struct { | |||
| 105 | thresholds *thlds; | 105 | thresholds *thlds; |
| 106 | size_t min_page_len; | 106 | size_t min_page_len; |
| 107 | size_t max_page_len; | 107 | size_t max_page_len; |
| 108 | char server_expect[MAX_INPUT_BUFFER]; | 108 | struct { |
| 109 | bool server_expect_yn; | 109 | char string[MAX_INPUT_BUFFER]; |
| 110 | bool is_present; | ||
| 111 | } server_expect; | ||
| 110 | char string_expect[MAX_INPUT_BUFFER]; | 112 | char string_expect[MAX_INPUT_BUFFER]; |
| 111 | char header_expect[MAX_INPUT_BUFFER]; | 113 | char header_expect[MAX_INPUT_BUFFER]; |
| 112 | mp_state_enum onredirect; | 114 | mp_state_enum onredirect; |
| @@ -154,8 +156,11 @@ check_curl_config check_curl_config_init() { | |||
| 154 | .thlds = NULL, | 156 | .thlds = NULL, |
| 155 | .min_page_len = 0, | 157 | .min_page_len = 0, |
| 156 | .max_page_len = 0, | 158 | .max_page_len = 0, |
| 157 | .server_expect = HTTP_EXPECT, | 159 | .server_expect = |
| 158 | .server_expect_yn = false, | 160 | { |
| 161 | .string = HTTP_EXPECT, | ||
| 162 | .is_present = false, | ||
| 163 | }, | ||
| 159 | .string_expect = "", | 164 | .string_expect = "", |
| 160 | .header_expect = "", | 165 | .header_expect = "", |
| 161 | .onredirect = STATE_OK, | 166 | .onredirect = STATE_OK, |
