diff options
-rw-r--r-- | plugins/check_tcp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c index 8cd86460..d1f6b84f 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c | |||
@@ -261,7 +261,7 @@ int main(int argc, char **argv) { | |||
261 | #ifdef HAVE_SSL | 261 | #ifdef HAVE_SSL |
262 | if (config.use_tls) { | 262 | if (config.use_tls) { |
263 | mp_subcheck tls_connection_result = mp_subcheck_init(); | 263 | mp_subcheck tls_connection_result = mp_subcheck_init(); |
264 | int result = np_net_ssl_init_with_hostname(socket_descriptor, (config.sni_specified ? config.sni : NULL)); | 264 | mp_state_enum result = np_net_ssl_init_with_hostname(socket_descriptor, (config.sni_specified ? config.sni : NULL)); |
265 | tls_connection_result = mp_set_subcheck_state(tls_connection_result, result); | 265 | tls_connection_result = mp_set_subcheck_state(tls_connection_result, result); |
266 | 266 | ||
267 | if (result == STATE_OK) { | 267 | if (result == STATE_OK) { |
@@ -448,6 +448,10 @@ int main(int argc, char **argv) { | |||
448 | expected_data_result = mp_set_subcheck_state(expected_data_result, config.expect_mismatch_state); | 448 | expected_data_result = mp_set_subcheck_state(expected_data_result, config.expect_mismatch_state); |
449 | xasprintf(&expected_data_result.output, "Answer failed to match expectation"); | 449 | xasprintf(&expected_data_result.output, "Answer failed to match expectation"); |
450 | mp_add_subcheck_to_check(&overall, expected_data_result); | 450 | mp_add_subcheck_to_check(&overall, expected_data_result); |
451 | } else if (match == NP_MATCH_SUCCESS) { | ||
452 | expected_data_result = mp_set_subcheck_state(expected_data_result, STATE_OK); | ||
453 | xasprintf(&expected_data_result.output, "The answer of the server matched the expectation"); | ||
454 | mp_add_subcheck_to_check(&overall, expected_data_result); | ||
451 | } | 455 | } |
452 | 456 | ||
453 | /* reset the alarm */ | 457 | /* reset the alarm */ |