nxt_conf_validation.c (518:810bdd1ab1b3) nxt_conf_validation.c (521:93dc4a28dd37)
1
2/*
3 * Copyright (C) Valentin V. Bartenev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8#include <nxt_conf.h>

--- 570 unchanged lines hidden (view full) ---

579
580 if (proc.spare < 0) {
581 return nxt_conf_vldt_error(vldt, "The \"spare\" number must not be "
582 "negative.");
583 }
584
585 if (proc.spare > NXT_INT32_T_MAX) {
586 return nxt_conf_vldt_error(vldt, "The \"spare\" number must not "
1
2/*
3 * Copyright (C) Valentin V. Bartenev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8#include <nxt_conf.h>

--- 570 unchanged lines hidden (view full) ---

579
580 if (proc.spare < 0) {
581 return nxt_conf_vldt_error(vldt, "The \"spare\" number must not be "
582 "negative.");
583 }
584
585 if (proc.spare > NXT_INT32_T_MAX) {
586 return nxt_conf_vldt_error(vldt, "The \"spare\" number must not "
587 "not exceed %d.", NXT_INT32_T_MAX);
587 "exceed %d.", NXT_INT32_T_MAX);
588 }
589
590 if (proc.max < 1) {
591 return nxt_conf_vldt_error(vldt, "The \"max\" number must be equal "
592 "to or greater than 1.");
593 }
594
595 if (proc.max > NXT_INT32_T_MAX) {
596 return nxt_conf_vldt_error(vldt, "The \"max\" number must not "
588 }
589
590 if (proc.max < 1) {
591 return nxt_conf_vldt_error(vldt, "The \"max\" number must be equal "
592 "to or greater than 1.");
593 }
594
595 if (proc.max > NXT_INT32_T_MAX) {
596 return nxt_conf_vldt_error(vldt, "The \"max\" number must not "
597 "not exceed %d.", NXT_INT32_T_MAX);
597 "exceed %d.", NXT_INT32_T_MAX);
598 }
599
600 if (proc.max < proc.spare) {
601 return nxt_conf_vldt_error(vldt, "The \"spare\" number must be "
602 "lower than \"max\".");
603 }
604
605 if (proc.idle_timeout < 0) {
606 return nxt_conf_vldt_error(vldt, "The \"idle_timeout\" number must not "
607 "be negative.");
608 }
609
610 if (proc.idle_timeout > NXT_INT32_T_MAX / 1000) {
611 return nxt_conf_vldt_error(vldt, "The \"idle_timeout\" number must not "
598 }
599
600 if (proc.max < proc.spare) {
601 return nxt_conf_vldt_error(vldt, "The \"spare\" number must be "
602 "lower than \"max\".");
603 }
604
605 if (proc.idle_timeout < 0) {
606 return nxt_conf_vldt_error(vldt, "The \"idle_timeout\" number must not "
607 "be negative.");
608 }
609
610 if (proc.idle_timeout > NXT_INT32_T_MAX / 1000) {
611 return nxt_conf_vldt_error(vldt, "The \"idle_timeout\" number must not "
612 "not exceed %d.", NXT_INT32_T_MAX / 1000);
612 "exceed %d.", NXT_INT32_T_MAX / 1000);
613 }
614
615 return NXT_OK;
616}
617
618
619static nxt_int_t
620nxt_conf_vldt_object_iterator(nxt_conf_validation_t *vldt,

--- 82 unchanged lines hidden (view full) ---

703 }
704
705 if (nxt_errno == 0) {
706 return nxt_conf_vldt_error(vldt, "Group \"%s\" is not found.", group);
707 }
708
709 return NXT_ERROR;
710}
613 }
614
615 return NXT_OK;
616}
617
618
619static nxt_int_t
620nxt_conf_vldt_object_iterator(nxt_conf_validation_t *vldt,

--- 82 unchanged lines hidden (view full) ---

703 }
704
705 if (nxt_errno == 0) {
706 return nxt_conf_vldt_error(vldt, "Group \"%s\" is not found.", group);
707 }
708
709 return NXT_ERROR;
710}
711
712