summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/check_ntp_peer.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/plugins/check_ntp_peer.c b/plugins/check_ntp_peer.c
index 0498a7d4..68b2fa9c 100644
--- a/plugins/check_ntp_peer.c
+++ b/plugins/check_ntp_peer.c
@@ -527,7 +527,8 @@ check_ntp_peer_config_wrapper process_arguments(int argc, char **argv) {
527 die(STATE_UNKNOWN, "failed to parse warning offset threshold"); 527 die(STATE_UNKNOWN, "failed to parse warning offset threshold");
528 } 528 }
529 529
530 mp_thresholds_set_warn(result.config.offset_thresholds, tmp.range); 530 result.config.offset_thresholds =
531 mp_thresholds_set_warn(result.config.offset_thresholds, tmp.range);
531 } break; 532 } break;
532 case 'c': { 533 case 'c': {
533 mp_range_parsed tmp = mp_parse_range_string(optarg); 534 mp_range_parsed tmp = mp_parse_range_string(optarg);
@@ -535,7 +536,8 @@ check_ntp_peer_config_wrapper process_arguments(int argc, char **argv) {
535 die(STATE_UNKNOWN, "failed to parse critical offset threshold"); 536 die(STATE_UNKNOWN, "failed to parse critical offset threshold");
536 } 537 }
537 538
538 mp_thresholds_set_crit(result.config.offset_thresholds, tmp.range); 539 result.config.offset_thresholds =
540 mp_thresholds_set_crit(result.config.offset_thresholds, tmp.range);
539 } break; 541 } break;
540 case 'W': { 542 case 'W': {
541 result.config.do_stratum = true; 543 result.config.do_stratum = true;
@@ -544,7 +546,8 @@ check_ntp_peer_config_wrapper process_arguments(int argc, char **argv) {
544 die(STATE_UNKNOWN, "failed to parse warning stratum threshold"); 546 die(STATE_UNKNOWN, "failed to parse warning stratum threshold");
545 } 547 }
546 548
547 mp_thresholds_set_warn(result.config.stratum_thresholds, tmp.range); 549 result.config.stratum_thresholds =
550 mp_thresholds_set_warn(result.config.stratum_thresholds, tmp.range);
548 } break; 551 } break;
549 case 'C': { 552 case 'C': {
550 result.config.do_stratum = true; 553 result.config.do_stratum = true;
@@ -553,7 +556,8 @@ check_ntp_peer_config_wrapper process_arguments(int argc, char **argv) {
553 die(STATE_UNKNOWN, "failed to parse critical stratum threshold"); 556 die(STATE_UNKNOWN, "failed to parse critical stratum threshold");
554 } 557 }
555 558
556 mp_thresholds_set_crit(result.config.stratum_thresholds, tmp.range); 559 result.config.stratum_thresholds =
560 mp_thresholds_set_crit(result.config.stratum_thresholds, tmp.range);
557 } break; 561 } break;
558 case 'j': { 562 case 'j': {
559 result.config.do_jitter = true; 563 result.config.do_jitter = true;
@@ -562,7 +566,8 @@ check_ntp_peer_config_wrapper process_arguments(int argc, char **argv) {
562 die(STATE_UNKNOWN, "failed to parse warning jitter threshold"); 566 die(STATE_UNKNOWN, "failed to parse warning jitter threshold");
563 } 567 }
564 568
565 mp_thresholds_set_warn(result.config.jitter_thresholds, tmp.range); 569 result.config.jitter_thresholds =
570 mp_thresholds_set_warn(result.config.jitter_thresholds, tmp.range);
566 } break; 571 } break;
567 case 'k': { 572 case 'k': {
568 result.config.do_jitter = true; 573 result.config.do_jitter = true;
@@ -571,7 +576,8 @@ check_ntp_peer_config_wrapper process_arguments(int argc, char **argv) {
571 die(STATE_UNKNOWN, "failed to parse critical jitter threshold"); 576 die(STATE_UNKNOWN, "failed to parse critical jitter threshold");
572 } 577 }
573 578
574 mp_thresholds_set_crit(result.config.jitter_thresholds, tmp.range); 579 result.config.jitter_thresholds =
580 mp_thresholds_set_crit(result.config.jitter_thresholds, tmp.range);
575 } break; 581 } break;
576 case 'm': { 582 case 'm': {
577 result.config.do_truechimers = true; 583 result.config.do_truechimers = true;
@@ -580,7 +586,8 @@ check_ntp_peer_config_wrapper process_arguments(int argc, char **argv) {
580 die(STATE_UNKNOWN, "failed to parse warning truechimer threshold"); 586 die(STATE_UNKNOWN, "failed to parse warning truechimer threshold");
581 } 587 }
582 588
583 mp_thresholds_set_warn(result.config.truechimer_thresholds, tmp.range); 589 result.config.truechimer_thresholds =
590 mp_thresholds_set_warn(result.config.truechimer_thresholds, tmp.range);
584 } break; 591 } break;
585 case 'n': { 592 case 'n': {
586 result.config.do_truechimers = true; 593 result.config.do_truechimers = true;
@@ -589,7 +596,8 @@ check_ntp_peer_config_wrapper process_arguments(int argc, char **argv) {
589 die(STATE_UNKNOWN, "failed to parse critical truechimer threshold"); 596 die(STATE_UNKNOWN, "failed to parse critical truechimer threshold");
590 } 597 }
591 598
592 mp_thresholds_set_crit(result.config.truechimer_thresholds, tmp.range); 599 result.config.truechimer_thresholds =
600 mp_thresholds_set_crit(result.config.truechimer_thresholds, tmp.range);
593 } break; 601 } break;
594 case 'H': 602 case 'H':
595 if (!is_host(optarg)) { 603 if (!is_host(optarg)) {