diff --git a/CHANGELOG.md b/CHANGELOG.md index 02517f899..566e7b171 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -67,6 +67,7 @@ - relay/api: fix "body_type" returned when lines or nicks of a buffer are requested - relay/api: fix read of one buffer line - relay/api: automatically disconnect when the command `/upgrade` is executed on the remote +- relay/api: disconnect from remote in case of error when sending data - relay: fix websocket permessage-deflate extension when the client doesn't send the max window bits parameters ([#1549](https://github.com/weechat/weechat/issues/1549)) - relay: fix allocation and reinit of field "client_context_takeover" in websocket deflate structure ([#1549](https://github.com/weechat/weechat/issues/1549)) - spell: improve error displayed when a word can not be added to the dictionary ([#2144](https://github.com/weechat/weechat/issues/2144)) diff --git a/po/cs.po b/po/cs.po index 33919bdfa..edc4baebd 100644 --- a/po/cs.po +++ b/po/cs.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-08-06 08:27+0200\n" +"POT-Creation-Date: 2024-08-09 18:24+0200\n" "PO-Revision-Date: 2024-06-11 07:49+0200\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: weechat-dev \n" @@ -13764,6 +13764,11 @@ msgstr "" msgid "%s%s: failed to execute route \"%s %s\" for client %s%s%s" msgstr "%s%s: selhalo parsování příkazu \"%s\" (prosím oznamte to vývojárům):" +#, fuzzy, c-format +#| msgid "%s%s: unable to create socket" +msgid "%sremote[%s]: unable to send data, disconnecting" +msgstr "%s%s: nemohu vytvořit soket" + #, c-format msgid "remote[%s]: WeeChat: %s (%s), API: %s" msgstr "" diff --git a/po/de.po b/po/de.po index cea9a2b8f..185621594 100644 --- a/po/de.po +++ b/po/de.po @@ -26,7 +26,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-08-06 08:27+0200\n" +"POT-Creation-Date: 2024-08-09 18:24+0200\n" "PO-Revision-Date: 2024-07-19 12:58+0200\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -15180,6 +15180,11 @@ msgstr "" msgid "%s%s: failed to execute route \"%s %s\" for client %s%s%s" msgstr "%s%s: Route „%s %s“ für Client %s%s%s konnte nicht ausgeführt werden" +#, fuzzy, c-format +#| msgid "%sremote[%s]: unable to create socket" +msgid "%sremote[%s]: unable to send data, disconnecting" +msgstr "%sremote[%s]: Socket kann nicht erstellt werden" + #, c-format msgid "remote[%s]: WeeChat: %s (%s), API: %s" msgstr "remote[%s]: WeeChat: %s (%s), API: %s" diff --git a/po/es.po b/po/es.po index 9a770f601..99a8f37b2 100644 --- a/po/es.po +++ b/po/es.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-08-06 08:27+0200\n" +"POT-Creation-Date: 2024-08-09 18:24+0200\n" "PO-Revision-Date: 2024-06-11 07:49+0200\n" "Last-Translator: Santiago Forero \n" "Language-Team: weechat-dev \n" @@ -14095,6 +14095,11 @@ msgstr "" msgid "%s%s: failed to execute route \"%s %s\" for client %s%s%s" msgstr "%s%s: falló la ejecución del comando \"%s\" por el cliente %s%s%s" +#, fuzzy, c-format +#| msgid "%s%s: unable to create socket" +msgid "%sremote[%s]: unable to send data, disconnecting" +msgstr "%s%s: no es posible crear el socket" + #, c-format msgid "remote[%s]: WeeChat: %s (%s), API: %s" msgstr "" diff --git a/po/fr.po b/po/fr.po index 0ebcb2398..e2ab72b2a 100644 --- a/po/fr.po +++ b/po/fr.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-08-06 08:27+0200\n" -"PO-Revision-Date: 2024-08-06 08:29+0200\n" +"POT-Creation-Date: 2024-08-09 18:24+0200\n" +"PO-Revision-Date: 2024-08-09 18:25+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -14862,6 +14862,10 @@ msgstr "" msgid "%s%s: failed to execute route \"%s %s\" for client %s%s%s" msgstr "%s%s : échec d'exécution de la route \"%s %s\" pour le client %s%s%s" +#, c-format +msgid "%sremote[%s]: unable to send data, disconnecting" +msgstr "%sremote[%s] : impossible d'envoyer des données, déconnexion" + #, c-format msgid "remote[%s]: WeeChat: %s (%s), API: %s" msgstr "remote[%s] : WeeChat : %s (%s), API : %s" diff --git a/po/hu.po b/po/hu.po index 3db047a5d..b219bd4a2 100644 --- a/po/hu.po +++ b/po/hu.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-08-06 08:27+0200\n" +"POT-Creation-Date: 2024-08-09 18:24+0200\n" "PO-Revision-Date: 2024-06-11 07:49+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -13206,6 +13206,10 @@ msgstr "" msgid "%s%s: failed to execute route \"%s %s\" for client %s%s%s" msgstr "Nem sikerült a(z) \"%s\" naplófájlt írni\n" +#, fuzzy, c-format +msgid "%sremote[%s]: unable to send data, disconnecting" +msgstr "%s nem sikerült a szervert létrehozni\n" + #, c-format msgid "remote[%s]: WeeChat: %s (%s), API: %s" msgstr "" diff --git a/po/it.po b/po/it.po index 004986651..ff3b80778 100644 --- a/po/it.po +++ b/po/it.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-08-06 08:27+0200\n" +"POT-Creation-Date: 2024-08-09 18:24+0200\n" "PO-Revision-Date: 2024-06-11 07:49+0200\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -14109,6 +14109,11 @@ msgstr "" msgid "%s%s: failed to execute route \"%s %s\" for client %s%s%s" msgstr "%s%s: impossibile eseguire il comando \"%s\" per il client %s%s%s" +#, fuzzy, c-format +#| msgid "%s%s: unable to create socket" +msgid "%sremote[%s]: unable to send data, disconnecting" +msgstr "%s%s: impossibile creare il socket" + #, c-format msgid "remote[%s]: WeeChat: %s (%s), API: %s" msgstr "" diff --git a/po/ja.po b/po/ja.po index 9d4659aec..40d6a555a 100644 --- a/po/ja.po +++ b/po/ja.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-08-06 08:27+0200\n" +"POT-Creation-Date: 2024-08-09 18:24+0200\n" "PO-Revision-Date: 2024-06-11 07:49+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" "Language-Team: weechat-dev \n" @@ -14462,6 +14462,11 @@ msgstr "" msgid "%s%s: failed to execute route \"%s %s\" for client %s%s%s" msgstr "%s%s: nie udało się wykonać trasy „%s %s” dla klienta %s%s%s" +#, fuzzy, c-format +#| msgid "%sremote[%s]: unable to create socket" +msgid "%sremote[%s]: unable to send data, disconnecting" +msgstr "%sremote[%s]: nie można utworzyć gniazda" + #, c-format msgid "remote[%s]: WeeChat: %s (%s), API: %s" msgstr "remote[%s]: WeeChat: %s (%s), API: %s" diff --git a/po/pt.po b/po/pt.po index 419bcc898..807e8d8de 100644 --- a/po/pt.po +++ b/po/pt.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-08-06 08:27+0200\n" +"POT-Creation-Date: 2024-08-09 18:24+0200\n" "PO-Revision-Date: 2024-06-11 07:49+0200\n" "Last-Translator: Vasco Almeida \n" "Language-Team: Portuguese <>\n" @@ -14448,6 +14448,11 @@ msgstr "" msgid "%s%s: failed to execute route \"%s %s\" for client %s%s%s" msgstr "%s%s: falha ao executar o comando \"%s\" do cliente %s%s%s" +#, fuzzy, c-format +#| msgid "%s%s: unable to create socket" +msgid "%sremote[%s]: unable to send data, disconnecting" +msgstr "%s%s: não foi possível criar socket" + #, c-format msgid "remote[%s]: WeeChat: %s (%s), API: %s" msgstr "" diff --git a/po/pt_BR.po b/po/pt_BR.po index e4693d973..867269ec5 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-08-06 08:27+0200\n" +"POT-Creation-Date: 2024-08-09 18:24+0200\n" "PO-Revision-Date: 2024-06-11 07:49+0200\n" "Last-Translator: Érico Nogueira \n" "Language-Team: weechat-dev \n" @@ -13631,6 +13631,10 @@ msgstr "" msgid "%s%s: failed to execute route \"%s %s\" for client %s%s%s" msgstr "%s%s: falha ao executar comando \"%s\" para cliente %d" +#, fuzzy, c-format +msgid "%sremote[%s]: unable to send data, disconnecting" +msgstr "%s%s: não foi possível criar pipe" + #, c-format msgid "remote[%s]: WeeChat: %s (%s), API: %s" msgstr "" diff --git a/po/ru.po b/po/ru.po index 6f962c103..aaf38b582 100644 --- a/po/ru.po +++ b/po/ru.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-08-06 08:27+0200\n" +"POT-Creation-Date: 2024-08-09 18:24+0200\n" "PO-Revision-Date: 2024-06-11 07:49+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -13258,6 +13258,10 @@ msgstr "" msgid "%s%s: failed to execute route \"%s %s\" for client %s%s%s" msgstr "Не могу записать лог-файл \"%s\"\n" +#, fuzzy, c-format +msgid "%sremote[%s]: unable to send data, disconnecting" +msgstr "%s не могу создать сервер\n" + #, c-format msgid "remote[%s]: WeeChat: %s (%s), API: %s" msgstr "" diff --git a/po/sr.po b/po/sr.po index ca97abac9..07534b257 100644 --- a/po/sr.po +++ b/po/sr.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-08-06 08:27+0200\n" +"POT-Creation-Date: 2024-08-09 18:24+0200\n" "PO-Revision-Date: 2024-07-10 11:29+0400\n" "Last-Translator: Ivan Pešić \n" "Language-Team: weechat-dev \n" @@ -14440,6 +14440,11 @@ msgstr "" msgid "%s%s: failed to execute route \"%s %s\" for client %s%s%s" msgstr "%s%s: није успело извршавање руте „%s %s” за клијента %s%s%s" +#, fuzzy, c-format +#| msgid "%sremote[%s]: unable to create socket" +msgid "%sremote[%s]: unable to send data, disconnecting" +msgstr "%sудаљени[%s]: није могао да се креира сокет" + #, c-format msgid "remote[%s]: WeeChat: %s (%s), API: %s" msgstr "удаљени[%s]: WeeChat: %s (%s), API: %s" diff --git a/po/tr.po b/po/tr.po index 46429e66c..4b1168b08 100644 --- a/po/tr.po +++ b/po/tr.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-08-06 08:27+0200\n" +"POT-Creation-Date: 2024-08-09 18:24+0200\n" "PO-Revision-Date: 2024-06-11 07:49+0200\n" "Last-Translator: Emir SARI \n" "Language-Team: weechat-dev \n" @@ -14714,6 +14714,11 @@ msgstr "" msgid "%s%s: failed to execute route \"%s %s\" for client %s%s%s" msgstr "%s%s: \"%s\" komutu yürütülemedi, %s%s%s istemcisi için" +#, fuzzy, c-format +#| msgid "%s%s: unable to create socket" +msgid "%sremote[%s]: unable to send data, disconnecting" +msgstr "%s%s: Soket oluşturulamıyor" + #, c-format msgid "remote[%s]: WeeChat: %s (%s), API: %s" msgstr "" diff --git a/po/weechat.pot b/po/weechat.pot index 869675f3b..02b131775 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2024-08-06 08:27+0200\n" +"POT-Creation-Date: 2024-08-09 18:24+0200\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -12067,6 +12067,10 @@ msgstr "" msgid "%s%s: failed to execute route \"%s %s\" for client %s%s%s" msgstr "" +#, c-format +msgid "%sremote[%s]: unable to send data, disconnecting" +msgstr "" + #, c-format msgid "remote[%s]: WeeChat: %s (%s), API: %s" msgstr "" diff --git a/src/plugins/relay/api/remote/relay-remote-event.c b/src/plugins/relay/api/remote/relay-remote-event.c index cdea486bd..dc9e4c410 100644 --- a/src/plugins/relay/api/remote/relay-remote-event.c +++ b/src/plugins/relay/api/remote/relay-remote-event.c @@ -657,7 +657,15 @@ relay_remote_event_buffer_input_cb (const void *pointer, cJSON_CreateString (input_data)); cJSON_AddItemToObject (json, "body", json_body); - relay_remote_network_send_json (ptr_remote, json); + if (relay_remote_network_send_json (ptr_remote, json) <= 0) + { + weechat_printf ( + NULL, + _("%sremote[%s]: unable to send data, disconnecting"), + weechat_prefix ("error"), + ptr_remote->name); + relay_remote_network_disconnect (ptr_remote); + } cJSON_Delete (json);