mirror of https://github.com/yandex/odyssey.git
odissey: add config route reset
This commit is contained in:
parent
749e19fbed
commit
9a7fafe6d5
|
@ -64,6 +64,7 @@ static od_keyword_t od_config_keywords[] =
|
||||||
od_keyword("user", OD_LUSER),
|
od_keyword("user", OD_LUSER),
|
||||||
od_keyword("password", OD_LPASSWORD),
|
od_keyword("password", OD_LPASSWORD),
|
||||||
od_keyword("ttl", OD_LTTL),
|
od_keyword("ttl", OD_LTTL),
|
||||||
|
od_keyword("reset", OD_LRESET),
|
||||||
od_keyword("pool_size", OD_LPOOL_SIZE),
|
od_keyword("pool_size", OD_LPOOL_SIZE),
|
||||||
od_keyword("pool_timeout", OD_LPOOL_TIMEOUT),
|
od_keyword("pool_timeout", OD_LPOOL_TIMEOUT),
|
||||||
/* users */
|
/* users */
|
||||||
|
@ -365,6 +366,13 @@ od_configparse_route(od_config_t *config, od_token_t *name)
|
||||||
return -1;
|
return -1;
|
||||||
route->ttl = tk->v.num;
|
route->ttl = tk->v.num;
|
||||||
continue;
|
continue;
|
||||||
|
/* reset */
|
||||||
|
case OD_LRESET:
|
||||||
|
rc = od_confignext_yes_no(config, &tk);
|
||||||
|
if (rc == -1)
|
||||||
|
return -1;
|
||||||
|
route->reset = tk->v.num;
|
||||||
|
continue;
|
||||||
case OD_LEOF:
|
case OD_LEOF:
|
||||||
od_configerror(config, tk, "unexpected end of config file");
|
od_configerror(config, tk, "unexpected end of config file");
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -37,6 +37,7 @@ enum {
|
||||||
OD_LUSER,
|
OD_LUSER,
|
||||||
OD_LPASSWORD,
|
OD_LPASSWORD,
|
||||||
OD_LTTL,
|
OD_LTTL,
|
||||||
|
OD_LRESET,
|
||||||
OD_LPOOL_SIZE,
|
OD_LPOOL_SIZE,
|
||||||
OD_LPOOL_TIMEOUT,
|
OD_LPOOL_TIMEOUT,
|
||||||
OD_LAUTHENTICATION,
|
OD_LAUTHENTICATION,
|
||||||
|
|
Loading…
Reference in New Issue