From 8fb2a95981deb64065a8593c9c33b3f930aadc3c Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Tue, 9 Jun 2020 11:29:03 +0200 Subject: Rename server_set_idle to server_set_idle_timeout --- cfgdir.c | 10 +++++----- server.c | 2 +- server.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cfgdir.c b/cfgdir.c index 120fa40..a43988e 100644 --- a/cfgdir.c +++ b/cfgdir.c @@ -25,7 +25,7 @@ enum scfg_keys { SCFG_KEY_PORT, SCFG_KEY_LOCAL, SCFG_KEY_REMOTE, - SCFG_KEY_IDLE, + SCFG_KEY_IDLE_TIMEOUT, }; struct cfg_key_value_map scfg_key_map[] = { @@ -50,8 +50,8 @@ struct cfg_key_value_map scfg_key_map[] = { .key_value = SCFG_KEY_REMOTE, .value_type = CFG_VAL_TYPE_ADDRS, }, { - .key_name = "idle", - .key_value = SCFG_KEY_IDLE, + .key_name = "idle_timeout", + .key_value = SCFG_KEY_IDLE_TIMEOUT, .value_type = CFG_VAL_TYPE_UINT16, }, { .key_name = NULL, @@ -121,8 +121,8 @@ scfg_parse(struct cfg *cfg, struct server *scfg) break; } - case SCFG_KEY_IDLE: - if (!server_set_idle(cfg, scfg, value.uint16)) + case SCFG_KEY_IDLE_TIMEOUT: + if (!server_set_idle_timeout(cfg, scfg, value.uint16)) return; break; diff --git a/server.c b/server.c index 77787fb..3ea6d77 100644 --- a/server.c +++ b/server.c @@ -319,7 +319,7 @@ server_add_local(struct cfg *cfg, struct server *scfg, struct sockaddr_in46 *add } bool -server_set_idle(struct cfg *cfg, struct server *scfg, uint16_t timeout) +server_set_idle_timeout(struct cfg *cfg, struct server *scfg, uint16_t timeout) { if (!scfg || scfg->idle_timeout != 0) return false; diff --git a/server.h b/server.h index 2e431dc..3c32844 100644 --- a/server.h +++ b/server.h @@ -49,7 +49,7 @@ bool server_add_remote(struct cfg *cfg, struct server *scfg, bool server_add_local(struct cfg *cfg, struct server *scfg, struct sockaddr_in46 *local); -bool server_set_idle(struct cfg *cfg, struct server *scfg, uint16_t timeout); +bool server_set_idle_timeout(struct cfg *cfg, struct server *scfg, uint16_t timeout); bool server_set_port(struct cfg *cfg, struct server *scfg, uint16_t port); -- cgit v1.2.3