From 055116f2b7b91975dad108d5427ccd84c8d4f5a3 Mon Sep 17 00:00:00 2001 From: Simon Arlott Date: Mon, 3 Sep 2012 10:26:45 +0200 Subject: [PATCH] irc: fix bug when changing server option "addresses" with less addresses (bug #37215) --- ChangeLog | 4 +++- po/cs.po | 6 +++--- po/de.po | 6 +++--- po/es.po | 6 +++--- po/fr.po | 6 +++--- po/hu.po | 4 ++-- po/it.po | 6 +++--- po/ja.po | 6 +++--- po/pl.po | 6 +++--- po/pt_BR.po | 6 +++--- po/ru.po | 4 ++-- po/weechat.pot | 4 ++-- src/plugins/irc/irc-server.c | 7 +++---- 13 files changed, 36 insertions(+), 35 deletions(-) diff --git a/ChangeLog b/ChangeLog index df1b3cb72..541b1c317 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ WeeChat ChangeLog ================= Sébastien Helleu -v0.3.9-rc1, 2012-08-30 +v0.3.9-rc1, 2012-09-03 Version 0.3.9 (under dev!) @@ -65,6 +65,8 @@ Version 0.3.9 (under dev!) * fifo: ignore read failing with error EAGAIN (bug #37019) * guile: fix crash when unloading a script without pointer to interpreter * guile: fix path of guile include dirs in cmake build (patch #7790) +* irc: fix bug when changing server option "addresses" with less addresses + (bug #37215) * irc: add network prefix in irc (dis)connection messages * irc: generate alternate nicks dynamically when all nicks are already in use (task #12209) diff --git a/po/cs.po b/po/cs.po index bd43cb838..e5bc94d96 100644 --- a/po/cs.po +++ b/po/cs.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-03 09:34+0200\n" +"POT-Creation-Date: 2012-09-03 10:12+0200\n" "PO-Revision-Date: 2012-08-20 15:20+0200\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -6842,8 +6842,8 @@ msgstr " - informace o certifikátu klienta (%s):" msgid "%sgnutls: unable to read certifcate \"%s\"" msgstr "%sgnutls: nemůžu číst certifikát \"%s\"" -#, c-format -msgid "%s%s: unknown address server \"%s\", cannot connect" +#, fuzzy, c-format +msgid "%s%s: unknown address for server \"%s\", cannot connect" msgstr "%s%s: neznámá adresa serveru \"%s\", nelze se spojit" #, c-format diff --git a/po/de.po b/po/de.po index 80d150f40..00c042c70 100644 --- a/po/de.po +++ b/po/de.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-03 09:34+0200\n" +"POT-Creation-Date: 2012-09-03 10:12+0200\n" "PO-Revision-Date: 2012-08-20 15:20+0200\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -7373,8 +7373,8 @@ msgstr " - Client Zertifikate-Information (%s):" msgid "%sgnutls: unable to read certifcate \"%s\"" msgstr "%sgnutls: Kann das Zertifikat \"%s\" nicht lesen" -#, c-format -msgid "%s%s: unknown address server \"%s\", cannot connect" +#, fuzzy, c-format +msgid "%s%s: unknown address for server \"%s\", cannot connect" msgstr "" "%s%s: unbekannte Adresse für Server \"%s\". Es kann keine Verbindung " "hergestellt werden" diff --git a/po/es.po b/po/es.po index 924735e52..3fe2bfea6 100644 --- a/po/es.po +++ b/po/es.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-03 09:34+0200\n" +"POT-Creation-Date: 2012-09-03 10:12+0200\n" "PO-Revision-Date: 2012-08-20 15:20+0200\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -7098,8 +7098,8 @@ msgstr " - información del certificado del cliente (%s):" msgid "%sgnutls: unable to read certifcate \"%s\"" msgstr "%sgnutls: no es posible leer el certificado \"%s\"" -#, c-format -msgid "%s%s: unknown address server \"%s\", cannot connect" +#, fuzzy, c-format +msgid "%s%s: unknown address for server \"%s\", cannot connect" msgstr "" "%s%s: dirección del servidor \"%s\" desconocida, no es posible conectarse" diff --git a/po/fr.po b/po/fr.po index 382df41d1..664600053 100644 --- a/po/fr.po +++ b/po/fr.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-03 09:34+0200\n" -"PO-Revision-Date: 2012-09-03 09:34+0200\n" +"POT-Creation-Date: 2012-09-03 10:12+0200\n" +"PO-Revision-Date: 2012-09-03 09:58+0200\n" "Last-Translator: Sebastien Helleu \n" "Language-Team: weechat-dev \n" "Language: French\n" @@ -7174,7 +7174,7 @@ msgid "%sgnutls: unable to read certifcate \"%s\"" msgstr "%sgnutls: impossible de lire le certificat \"%s\"" #, c-format -msgid "%s%s: unknown address server \"%s\", cannot connect" +msgid "%s%s: unknown address for server \"%s\", cannot connect" msgstr "%s%s: adresse inconnue pour le serveur \"%s\", connexion impossible" #, c-format diff --git a/po/hu.po b/po/hu.po index a19ad0709..474d7e71d 100644 --- a/po/hu.po +++ b/po/hu.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-03 09:34+0200\n" +"POT-Creation-Date: 2012-09-03 10:12+0200\n" "PO-Revision-Date: 2012-08-20 15:20+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -6389,7 +6389,7 @@ msgid "%sgnutls: unable to read certifcate \"%s\"" msgstr "Nem sikerült a(z) \"%s\" naplófájlt írni\n" #, fuzzy, c-format -msgid "%s%s: unknown address server \"%s\", cannot connect" +msgid "%s%s: unknown address for server \"%s\", cannot connect" msgstr "%s név \"%s\" nem található a \"%s\" parancshoz\n" #, fuzzy, c-format diff --git a/po/it.po b/po/it.po index e211b8084..2542ad201 100644 --- a/po/it.po +++ b/po/it.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-03 09:34+0200\n" +"POT-Creation-Date: 2012-09-03 10:12+0200\n" "PO-Revision-Date: 2012-08-20 15:20+0200\n" "Last-Translator: Marco Paolone \n" "Language-Team: weechat-dev \n" @@ -7092,8 +7092,8 @@ msgstr " - info sul certificato (%s) del client:" msgid "%sgnutls: unable to read certifcate \"%s\"" msgstr "%sgnutls: impossibile leggere il certificato \"%s\"" -#, c-format -msgid "%s%s: unknown address server \"%s\", cannot connect" +#, fuzzy, c-format +msgid "%s%s: unknown address for server \"%s\", cannot connect" msgstr "%s%s: indirizzo server \"%s\" sconosciuto, impossibile connettersi" #, c-format diff --git a/po/ja.po b/po/ja.po index 557eef607..4e60a3887 100644 --- a/po/ja.po +++ b/po/ja.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-03 09:34+0200\n" +"POT-Creation-Date: 2012-09-03 10:12+0200\n" "PO-Revision-Date: 2012-08-20 15:20+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" @@ -6925,8 +6925,8 @@ msgstr " - クライアント証明書情報 (%s):" msgid "%sgnutls: unable to read certifcate \"%s\"" msgstr "%sgnutls: 証明書 \"%s\" が読めません" -#, c-format -msgid "%s%s: unknown address server \"%s\", cannot connect" +#, fuzzy, c-format +msgid "%s%s: unknown address for server \"%s\", cannot connect" msgstr "%s%s: サーバ \"%s\" のアドレスが不明、接続できません" #, c-format diff --git a/po/pl.po b/po/pl.po index 15a95fd60..ecb1771c3 100644 --- a/po/pl.po +++ b/po/pl.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-03 09:34+0200\n" +"POT-Creation-Date: 2012-09-03 10:12+0200\n" "PO-Revision-Date: 2012-08-20 15:20+0200\n" "Last-Translator: Krzysztof Korościk \n" "Language-Team: weechat-dev \n" @@ -7053,8 +7053,8 @@ msgstr " - informacje o certyfikacie klienta (%s):" msgid "%sgnutls: unable to read certifcate \"%s\"" msgstr "%sgnutls: nie można odczytać certyfikatu \"%s\"" -#, c-format -msgid "%s%s: unknown address server \"%s\", cannot connect" +#, fuzzy, c-format +msgid "%s%s: unknown address for server \"%s\", cannot connect" msgstr "%s%s: nieznany adres serwera \"%s\", nie można połączyć" #, c-format diff --git a/po/pt_BR.po b/po/pt_BR.po index 6e9dbf751..ab432430b 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-03 09:34+0200\n" +"POT-Creation-Date: 2012-09-03 10:12+0200\n" "PO-Revision-Date: 2012-08-20 15:20+0200\n" "Last-Translator: Sergio Durigan Junior \n" "Language-Team: weechat-dev \n" @@ -6546,8 +6546,8 @@ msgstr " - informações do certificado do cliente (%s):" msgid "%sgnutls: unable to read certifcate \"%s\"" msgstr "%sgnutls: não foi possível ler certificado \"%s\"" -#, c-format -msgid "%s%s: unknown address server \"%s\", cannot connect" +#, fuzzy, c-format +msgid "%s%s: unknown address for server \"%s\", cannot connect" msgstr "" "%s%s: endereço desconhecido \"%s\" do servidor, não foi possível conectar" diff --git a/po/ru.po b/po/ru.po index ee0577db7..56bfc5931 100644 --- a/po/ru.po +++ b/po/ru.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-03 09:34+0200\n" +"POT-Creation-Date: 2012-09-03 10:12+0200\n" "PO-Revision-Date: 2012-08-20 15:20+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -6418,7 +6418,7 @@ msgid "%sgnutls: unable to read certifcate \"%s\"" msgstr "Не могу записать лог-файл \"%s\"\n" #, fuzzy, c-format -msgid "%s%s: unknown address server \"%s\", cannot connect" +msgid "%s%s: unknown address for server \"%s\", cannot connect" msgstr "%s ник \"%s\" не найден для команды \"%s\"\n" #, fuzzy, c-format diff --git a/po/weechat.pot b/po/weechat.pot index 82633a668..f006868d3 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-09-03 09:34+0200\n" +"POT-Creation-Date: 2012-09-03 10:12+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -5594,7 +5594,7 @@ msgid "%sgnutls: unable to read certifcate \"%s\"" msgstr "" #, c-format -msgid "%s%s: unknown address server \"%s\", cannot connect" +msgid "%s%s: unknown address for server \"%s\", cannot connect" msgstr "" #, c-format diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index ad0936cad..716f5d58b 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -404,11 +404,10 @@ irc_server_set_index_current_address (struct t_irc_server *server, int index) } server->current_port = 0; - if (index < server->addresses_count) + if (server->addresses_count > 0) { + index %= server->addresses_count; server->index_current_address = index; - if (server->current_address) - free (server->current_address); server->current_address = strdup (server->addresses_array[index]); server->current_port = server->ports_array[index]; } @@ -3593,7 +3592,7 @@ irc_server_connect (struct t_irc_server *server) if (!server->current_address) { weechat_printf (server->buffer, - _("%s%s: unknown address server \"%s\", " + _("%s%s: unknown address for server \"%s\", " "cannot connect"), weechat_prefix ("error"), IRC_PLUGIN_NAME, server->name);