From bbdd4abc9f787f057848a5b97656509b877793e0 Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Sun, 12 Jul 2020 22:30:22 +0200 Subject: Move more static strings to config.h --- shared/config-parser.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'shared') diff --git a/shared/config-parser.c b/shared/config-parser.c index 8cb6dcd..00f9944 100644 --- a/shared/config-parser.c +++ b/shared/config-parser.c @@ -339,19 +339,19 @@ void sprop_parse(struct server_config *scfg, char *buf, const char *keyname; struct cfg_value value; - if (!config_parse_line("server.properties", &pos, sprop_key_map, - &key, &keyname, &value, false, lineno, - error)) + if (!config_parse_line(MC_SERVER_PROPERTIES, &pos, + sprop_key_map, &key, &keyname, &value, + false, lineno, error)) break; switch (key) { case SPROP_KEY_SERVER_PORT: debug(DBG_CFG, "found remote server port in " - "server.properties"); + MC_SERVER_PROPERTIES); if (!list_empty(&scfg->remotes)) { error("mc server address set both in %s and " - "server.properties", scfg->filename); + MC_SERVER_PROPERTIES, scfg->filename); break; } @@ -361,11 +361,11 @@ void sprop_parse(struct server_config *scfg, char *buf, case SPROP_KEY_RCON_PORT: debug(DBG_CFG, "found rcon port in " - "server.properties"); + MC_SERVER_PROPERTIES); if (!list_empty(&scfg->rcons)) { error("rcon address set both in %s and " - "server.properties", scfg->filename); + MC_SERVER_PROPERTIES, scfg->filename); break; } @@ -375,11 +375,11 @@ void sprop_parse(struct server_config *scfg, char *buf, case SPROP_KEY_RCON_PASSWORD: debug(DBG_CFG, "found rcon password in " - "server.properties"); + MC_SERVER_PROPERTIES); if (scfg->rcon_password) { error("rcon password set both in %s and " - "server.properties (%smatching)", + MC_SERVER_PROPERTIES " (%smatching)", scfg->filename, streq(scfg->rcon_password, value.str) ? "" : "not"); @@ -406,7 +406,7 @@ bool scfg_parse(struct server_config *scfg, char *buf, bool async, *lineno = 0; - if (!config_parse_header(SERVER_CFG_HEADER, &pos, lineno)) + if (!config_parse_header(SERVER_CONFIG_FILE_HEADER, &pos, lineno)) ERROR("missing/invalid header"); while (true) { -- cgit v1.2.3