Skip to content

Commit

Permalink
fixed the default values for def.server when not given
Browse files Browse the repository at this point in the history
  • Loading branch information
emil916 committed May 25, 2024
1 parent 11d1484 commit ac532d1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions runtime/include/tenant_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,19 @@ tenant_config_validate(struct tenant_config *config, bool *did_set)

if (scheduler == SCHEDULER_MTDS) {
if (did_set[tenant_config_member_replenishment_period_us] == false) {
fprintf(stderr, "replenishment-period-us field is required\n");
return -1;
fprintf(stderr, "replenishment-period-us field is missing, so defaulting to 0\n");
config->replenishment_period_us = 0;
}

if (config->replenishment_period_us > (uint32_t)RUNTIME_RELATIVE_DEADLINE_US_MAX) {
fprintf(stderr, "Relative-deadline-us must be between 0 and %u, was %u\n",
fprintf(stderr, "relative-deadline-us must be between 0 and %u, was %u\n",
(uint32_t)RUNTIME_RELATIVE_DEADLINE_US_MAX, config->replenishment_period_us);
return -1;
}

if (did_set[tenant_config_member_max_budget_us] == false) {
fprintf(stderr, "max-budget-us field is required\n");
return -1;
fprintf(stderr, "max-budget-us field is missing, so defaulting to 0\n");
config->max_budget_us = 0;
}

if (config->max_budget_us > (uint32_t)RUNTIME_RELATIVE_DEADLINE_US_MAX) {
Expand Down

0 comments on commit ac532d1

Please sign in to comment.