}
break;
}
- case SET_IN_PORT:
- case SET_IN_PORT_ZERO: {
+ case SET_IN_PORT: {
const in_port_t *val = value, *dval = default_value;
if (dump_default || dval == NULL || *val != *dval)
case SET_UINT_OCT:
case SET_TIME:
case SET_IN_PORT:
- case SET_IN_PORT_ZERO:
case SET_STR_VARS:
case SET_STR:
case SET_ENUM:
return 0;
}
-static int
-get_in_port(struct setting_parser_context *ctx, const char *value,
- in_port_t *result_r)
-{
- if (net_str2port(value, result_r) < 0) {
- ctx->error = p_strdup_printf(ctx->parser_pool,
- "Invalid port number %s", value);
- return -1;
- }
- return 0;
-}
-
static int
get_in_port_zero(struct setting_parser_context *ctx, const char *value,
in_port_t *result_r)
}
break;
case SET_IN_PORT:
- if (get_in_port(ctx, value, (in_port_t *)ptr) < 0)
- return -1;
- break;
- case SET_IN_PORT_ZERO:
if (get_in_port_zero(ctx, value, (in_port_t *)ptr) < 0)
return -1;
break;
case SET_TIME:
case SET_SIZE:
case SET_IN_PORT:
- case SET_IN_PORT_ZERO:
case SET_STR:
case SET_ENUM:
case SET_STRLIST:
case SET_TIME:
case SET_SIZE:
case SET_IN_PORT:
- case SET_IN_PORT_ZERO:
case SET_STR:
case SET_ENUM:
case SET_STRLIST:
*dest_size = *src_size;
break;
}
- case SET_IN_PORT:
- case SET_IN_PORT_ZERO: {
+ case SET_IN_PORT: {
const in_port_t *src_size = src;
in_port_t *dest_size = dest;
case SET_TIME:
case SET_SIZE:
case SET_IN_PORT:
- case SET_IN_PORT_ZERO:
case SET_STR_VARS:
case SET_STR:
case SET_ENUM:
SET_TIME,
SET_SIZE,
SET_IN_PORT, /* internet port */
- SET_IN_PORT_ZERO, /* internet port */
SET_STR,
SET_STR_VARS, /* string with %variables */
SET_ENUM,
static const struct setting_define inet_listener_setting_defines[] = {
DEF(SET_STR, name),
DEF(SET_STR, address),
- DEF(SET_IN_PORT_ZERO, port),
+ DEF(SET_IN_PORT, port),
DEF(SET_BOOL, ssl),
DEF(SET_BOOL, reuse_port),
DEF(SET_BOOL, haproxy),
static const struct setting_define aggregator_setting_defines[] = {
DEF(SET_STR, replicator_host),
- DEF(SET_IN_PORT_ZERO, replicator_port),
+ DEF(SET_IN_PORT, replicator_port),
SETTING_DEFINE_LIST_END
};