odissey: add config route reset

This commit is contained in:
Dmitry Simonenko 2017-02-14 18:27:20 +03:00
parent 749e19fbed
commit 9a7fafe6d5
2 changed files with 9 additions and 0 deletions

View File

@ -64,6 +64,7 @@ static od_keyword_t od_config_keywords[] =
od_keyword("user", OD_LUSER),
od_keyword("password", OD_LPASSWORD),
od_keyword("ttl", OD_LTTL),
od_keyword("reset", OD_LRESET),
od_keyword("pool_size", OD_LPOOL_SIZE),
od_keyword("pool_timeout", OD_LPOOL_TIMEOUT),
/* users */
@ -365,6 +366,13 @@ od_configparse_route(od_config_t *config, od_token_t *name)
return -1;
route->ttl = tk->v.num;
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:
od_configerror(config, tk, "unexpected end of config file");
return -1;

View File

@ -37,6 +37,7 @@ enum {
OD_LUSER,
OD_LPASSWORD,
OD_LTTL,
OD_LRESET,
OD_LPOOL_SIZE,
OD_LPOOL_TIMEOUT,
OD_LAUTHENTICATION,