Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/ctld/uclparse.c
Show First 20 Lines • Show All 769 Lines • ▼ Show 20 Lines | if (!strcmp(key, "port")) { | ||||
tp = port_new_pp(conf, target, pp); | tp = port_new_pp(conf, target, pp); | ||||
if (tp == NULL) { | if (tp == NULL) { | ||||
log_warnx("can't link port \"%s\" to target \"%s\"", | log_warnx("can't link port \"%s\" to target \"%s\"", | ||||
value, target->t_name); | value, target->t_name); | ||||
return (1); | return (1); | ||||
} | } | ||||
} | } | ||||
if (!strcmp(key, "max_conn")) { | |||||
if (obj->type != UCL_STRING) { | |||||
log_warnx("\"max_conn\" property of target " | |||||
"\"%s\" is not a string", target->t_name); | |||||
return (1); | |||||
} | |||||
target->t_max_conn = strdup(ucl_object_tostring(obj)); | |||||
} | |||||
if (!strcmp(key, "redirect")) { | if (!strcmp(key, "redirect")) { | ||||
if (obj->type != UCL_STRING) { | if (obj->type != UCL_STRING) { | ||||
log_warnx("\"redirect\" property of target " | log_warnx("\"redirect\" property of target " | ||||
"\"%s\" is not a string", target->t_name); | "\"%s\" is not a string", target->t_name); | ||||
return (1); | return (1); | ||||
} | } | ||||
if (target_set_redirection(target, | if (target_set_redirection(target, | ||||
▲ Show 20 Lines • Show All 127 Lines • Show Last 20 Lines |