update: add name option for pools with same names

This commit is contained in:
ngn 2024-08-18 04:01:17 +03:00
parent 41111ce76d
commit 41318f3b1f
4 changed files with 15 additions and 9 deletions

View File

@ -11,7 +11,7 @@ HDRS = $(wildcard include/*.h)
CFLAGS = -O3 -fstack-protector-strong -fcf-protection=full -fstack-clash-protection CFLAGS = -O3 -fstack-protector-strong -fcf-protection=full -fstack-clash-protection
LIBS = -linih -lmp LIBS = -linih -lmp
VERSION = 24.00 VERSION = 24.01
all: dist dist/pooler $(PO_OUTS) all: dist dist/pooler $(PO_OUTS)

View File

@ -4,6 +4,7 @@
addr = 0.0.0.0:5858 addr = 0.0.0.0:5858
threads = 10 threads = 10
# [pool-name] # [pool-config]
# name = pool-name
# host = pool.example.com # host = pool.example.com
# dir = /srv/pools/pool-name # dir = /srv/pools/pool-name

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-08-18 03:46+0300\n" "POT-Creation-Date: 2024-08-18 04:00+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -17,27 +17,27 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: src/config.c:130 #: src/config.c:135
#, c-format #, c-format
msgid "Unknown configuration option: %s" msgid "Unknown configuration option: %s"
msgstr "" msgstr ""
#: src/config.c:132 #: src/config.c:137
#, c-format #, c-format
msgid "Unknown configuration option: %s/%s" msgid "Unknown configuration option: %s/%s"
msgstr "" msgstr ""
#: src/config.c:140 #: src/config.c:145
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to access the configuration file: %s" msgid "Failed to access the configuration file: %s"
msgstr "Kayıt dosyasını açmak başarısız oldu: %s" msgstr "Kayıt dosyasını açmak başarısız oldu: %s"
#: src/config.c:145 #: src/config.c:150
#, fuzzy #, fuzzy
msgid "Failed to parse the configuration" msgid "Failed to parse the configuration"
msgstr "Kayıt dosyasını açmak başarısız oldu: %s" msgstr "Kayıt dosyasını açmak başarısız oldu: %s"
#: src/config.c:152 #: src/config.c:157
#, fuzzy, c-format #, fuzzy, c-format
msgid "Hostname not specified for the pool: %s" msgid "Hostname not specified for the pool: %s"
msgstr "Ana makine adı havuz konfigürasyonunda belirtilmedi, geçiliyor: %s" msgstr "Ana makine adı havuz konfigürasyonunda belirtilmedi, geçiliyor: %s"

View File

@ -105,7 +105,12 @@ int config_load_handler(void *data, const char *_section, const char *_key, cons
if (!config_pool_contains(section)) if (!config_pool_contains(section))
config_pool_add(section); config_pool_add(section);
if (eq(key, "host")) { if (eq(key, "name")) {
free(config.pools->name);
config.pools->name = strdup(value);
}
else if (eq(key, "host")) {
free(config.pools->host); free(config.pools->host);
config.pools->host = strdup(value); config.pools->host = strdup(value);
} }