From 7cc249aac69b7124c51e4bf6ff8cd5443e04b67b Mon Sep 17 00:00:00 2001 From: ngn Date: Sun, 25 Aug 2024 14:28:43 +0300 Subject: [PATCH] fix: use the signed type for ctx_sync return --- Makefile | 2 +- locale/tr/LC_MESSAGES/pooler.po | 31 +++++++++++++++---------------- src/main.c | 6 ++---- 3 files changed, 18 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index c8c1de2..e7da210 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ HDRS = $(wildcard include/*.h) CFLAGS = -O3 -fstack-protector-strong -fcf-protection=full -fstack-clash-protection LIBS = -linih -lmp -VERSION = 24.01 +VERSION = 24.03 all: dist dist/pooler $(PO_OUTS) diff --git a/locale/tr/LC_MESSAGES/pooler.po b/locale/tr/LC_MESSAGES/pooler.po index fc9cfe3..9c8dc7e 100644 --- a/locale/tr/LC_MESSAGES/pooler.po +++ b/locale/tr/LC_MESSAGES/pooler.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-08-18 04:11+0300\n" +"POT-Creation-Date: 2024-08-25 14:08+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -109,51 +109,50 @@ msgstr "Lütfen geçerli bir işlem sayısı belirtin (1-1000)" msgid "Please specify at least one pool in the configuration" msgstr "Lütfen konfigürasyonda en az bir havuz belirtin" -#: src/main.c:147 -#, fuzzy, c-format -msgid "%s: loading the pool" -msgstr "%s: havuz bilgisi başarıyla yüklendi" - -#: src/main.c:150 +#: src/main.c:148 #, fuzzy, c-format msgid "%s: hostname not specified for pool, skipping" msgstr "Ana makine adı havuz konfigürasyonunda belirtilmedi, geçiliyor: %s" -#: src/main.c:164 +#: src/main.c:162 #, fuzzy, c-format msgid "%s: failed access the pool directory (%s)" msgstr "Havuz dizinine erişilemiyor: %s" -#: src/main.c:169 +#: src/main.c:167 #, fuzzy, c-format msgid "%s: failed to add pool to the list (%s)" msgstr "Havuzu listeye eklemek başarısız oldu: %s" -#: src/main.c:177 -#, c-format -msgid "Failed to sync the pools: %s" +#: src/main.c:175 +#, fuzzy +msgid "Failed to sync the pools, please see the errors above" msgstr "Havuzları sekronize etmek başarısız oldu: %s" -#: src/main.c:182 +#: src/main.c:180 #, fuzzy msgid "None of the pools is available for serving" msgstr "Havuzların hiçbiri sunmak için müsait değil" -#: src/main.c:186 +#: src/main.c:184 #, c-format msgid "Serving %lu pool on %s" msgstr "%lu tane havuz %s adresinde sunuluyor" -#: src/main.c:186 +#: src/main.c:184 #, c-format msgid "Serving %lu pools on %s" msgstr "%lu tane havuz %s adresinde sunuluyor" -#: src/main.c:189 +#: src/main.c:187 #, c-format msgid "Failed to start the server: %s" msgstr "Sunucuyu başlatmak başarısız oldu: %s" +#, fuzzy, c-format +#~ msgid "%s: loading the pool" +#~ msgstr "%s: havuz bilgisi başarıyla yüklendi" + #, fuzzy, c-format #~ msgid "%s: loaded the pool" #~ msgstr "%s: havuz bilgisi başarıyla yüklendi" diff --git a/src/main.c b/src/main.c index 2ffb5ee..d956b0c 100644 --- a/src/main.c +++ b/src/main.c @@ -117,7 +117,7 @@ int main(int argc, char *argv[]) { char *addr = NULL, *logfile = NULL, *tmpdir = NULL; int ret = EXIT_FAILURE; pool_config_t *pool = NULL; - size_t pool_count = 0; + ssize_t pool_count = 0; lm_ctx_t ctx; if (!config_load(argv[1])) @@ -144,8 +144,6 @@ int main(int argc, char *argv[]) { } while (NULL != pool) { - info(_("%s: loading the pool"), pool->name); - if (NULL == pool->host) { error(_("%s: hostname not specified for pool, skipping"), pool->name); goto end_ctx; @@ -174,7 +172,7 @@ int main(int argc, char *argv[]) { } if ((pool_count = lm_ctx_sync(&ctx, false, sync_callback, NULL)) < 0) { - error(_("Failed to sync the pools: %s"), lm_strerror()); + error(_("Failed to sync the pools, please see the errors above")); goto end_ctx; }