From e890ac0a81dba1ad9810249eb89ead63b9e53c1f Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Tue, 26 Feb 2013 21:43:39 +0100 Subject: [PATCH] xfer: fix freeze of DCC file received: use non-blocking socket after connection to sender and ensure the ACK is properly sent (bug #38340) --- ChangeLog | 2 ++ po/cs.po | 22 +++++++++++++--------- po/de.po | 22 +++++++++++++--------- po/es.po | 22 +++++++++++++--------- po/fr.po | 24 ++++++++++++++---------- po/hu.po | 22 +++++++++++++--------- po/it.po | 22 +++++++++++++--------- po/ja.po | 22 +++++++++++++--------- po/pl.po | 22 +++++++++++++--------- po/pt_BR.po | 22 +++++++++++++--------- po/ru.po | 22 +++++++++++++--------- po/weechat.pot | 22 +++++++++++++--------- src/plugins/xfer/xfer-dcc.c | 33 ++++++++++++++++++++++++++++++--- src/plugins/xfer/xfer-network.c | 5 +++++ src/plugins/xfer/xfer.h | 3 +++ 15 files changed, 184 insertions(+), 103 deletions(-) diff --git a/ChangeLog b/ChangeLog index 26c094e16..009105327 100644 --- a/ChangeLog +++ b/ChangeLog @@ -61,6 +61,8 @@ Version 0.4.1 (under dev!) "noautoload" and "toggleautoload" for command /script, add action "A" (meta-A) on script buffer (toggle autoload) (task #12393) * scripts: do not allow empty script name in function "register" +* xfer: fix freeze of DCC file received: use non-blocking socket after + connection to sender and ensure the ACK is properly sent (bug #38340) Version 0.4.0 (2013-01-20) -------------------------- diff --git a/po/cs.po b/po/cs.po index 1b9d0b4f0..958a59d8b 100644 --- a/po/cs.po +++ b/po/cs.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.1-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-02-24 22:17+0100\n" +"POT-Creation-Date: 2013-02-26 21:38+0100\n" "PO-Revision-Date: 2013-02-23 11:11+0100\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -8495,6 +8495,14 @@ msgstr "%s%s: skript \"%s\" nenačten" msgid "%s: script \"%s\" is not loaded" msgstr "%s%s: skript \"%s\" nenačten" +#, fuzzy, c-format +msgid "%s: script \"%s\" not found" +msgstr "%s%s: skript \"%s\" nenalezen" + +#, fuzzy, c-format +msgid "%s: script \"%s\" is not installed" +msgstr "%s%s: skript \"%s\" nenačten" + #, fuzzy, c-format msgid "%s: autoload enabled for script \"%s\"" msgstr "%s: odebírám skript \"%s\"" @@ -8503,10 +8511,6 @@ msgstr "%s: odebírám skript \"%s\"" msgid "%s: autoload disabled for script \"%s\"" msgstr "%s: odebírám skript \"%s\"" -#, fuzzy, c-format -msgid "%s: script \"%s\" not found" -msgstr "%s%s: skript \"%s\" nenalezen" - #, fuzzy, c-format msgid "%s%s: error downloading script \"%s\": %s" msgstr "%s: odebírám skript \"%s\"" @@ -8521,10 +8525,6 @@ msgstr "" msgid "%s: downloading script \"%s\"..." msgstr "%s: odebírám skript \"%s\"" -#, fuzzy, c-format -msgid "%s: script \"%s\" is not installed" -msgstr "%s%s: skript \"%s\" nenačten" - #, fuzzy, c-format msgid "%s: script \"%s\" is held" msgstr "%s: skript \"%s\" odebrán" @@ -9307,6 +9307,10 @@ msgstr "%s%s: nemohu přijmout blok od odesílatele" msgid "%s%s: unable to write local file" msgstr "%s%s: nemohu zapisovat do lokálního souboru" +#, fuzzy, c-format +msgid "%s%s: unable to send ACK to sender" +msgstr "%s%s: nemohu se připojit k odesílateli" + #, c-format msgid "%s%s: unable to fork" msgstr "%s%s: nemohu provést fork" diff --git a/po/de.po b/po/de.po index 6d6137816..1d0cea135 100644 --- a/po/de.po +++ b/po/de.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.1-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-02-24 22:17+0100\n" +"POT-Creation-Date: 2013-02-26 21:38+0100\n" "PO-Revision-Date: 2013-02-23 18:31+0100\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -9255,6 +9255,14 @@ msgstr "%s: Erweiterung \"%s\" ist nicht installiert" msgid "%s: script \"%s\" is not loaded" msgstr "%s: Das Skript \"%s\" wurde nicht installiert" +#, c-format +msgid "%s: script \"%s\" not found" +msgstr "%s: Skript \"%s\" nicht gefunden" + +#, c-format +msgid "%s: script \"%s\" is not installed" +msgstr "%s: Skript \"%s\" ist nicht installiert" + #, fuzzy, c-format msgid "%s: autoload enabled for script \"%s\"" msgstr "" @@ -9265,10 +9273,6 @@ msgid "%s: autoload disabled for script \"%s\"" msgstr "" "%s: Skript \"%s\" liegt in einer nicht unterstützen Programmiersprache vor" -#, c-format -msgid "%s: script \"%s\" not found" -msgstr "%s: Skript \"%s\" nicht gefunden" - #, c-format msgid "%s%s: error downloading script \"%s\": %s" msgstr "%s%s: Fehler beim Herunterladen des Skriptes \"%s\": %s" @@ -9284,10 +9288,6 @@ msgstr "" msgid "%s: downloading script \"%s\"..." msgstr "%s: Lade Skript \"%s\" herunter..." -#, c-format -msgid "%s: script \"%s\" is not installed" -msgstr "%s: Skript \"%s\" ist nicht installiert" - #, c-format msgid "%s: script \"%s\" is held" msgstr "%s: Skript \"%s\" wird nicht überschrieben" @@ -10184,6 +10184,10 @@ msgstr "%s%s: Der Block kann vom Versender nicht empfangen werden" msgid "%s%s: unable to write local file" msgstr "%s%s: Die lokale Datei kann nicht erstellt werden" +#, fuzzy, c-format +msgid "%s%s: unable to send ACK to sender" +msgstr "%s%s: Eine Verbindung zum Versender kann nicht herstellt werden" + #, c-format msgid "%s%s: unable to fork" msgstr "%s%s: es kann kein fork erstellt werden" diff --git a/po/es.po b/po/es.po index 209ed2e06..1ff56dfe5 100644 --- a/po/es.po +++ b/po/es.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.1-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-02-24 22:17+0100\n" +"POT-Creation-Date: 2013-02-26 21:38+0100\n" "PO-Revision-Date: 2013-02-23 11:11+0100\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -8755,6 +8755,14 @@ msgstr "%s: el plugin \"%s\" no está cargado" msgid "%s: script \"%s\" is not loaded" msgstr "%s: el script \"%s\" no está cargado" +#, c-format +msgid "%s: script \"%s\" not found" +msgstr "%s: script \"%s\" no encontrado" + +#, c-format +msgid "%s: script \"%s\" is not installed" +msgstr "%s: el script \"%s\" no esta instalado" + #, fuzzy, c-format msgid "%s: autoload enabled for script \"%s\"" msgstr "%s: lenguaje del script \"%s\" desconocido" @@ -8763,10 +8771,6 @@ msgstr "%s: lenguaje del script \"%s\" desconocido" msgid "%s: autoload disabled for script \"%s\"" msgstr "%s: lenguaje del script \"%s\" desconocido" -#, c-format -msgid "%s: script \"%s\" not found" -msgstr "%s: script \"%s\" no encontrado" - #, c-format msgid "%s%s: error downloading script \"%s\": %s" msgstr "%s%s: error al descargar el script \"%s\": %s" @@ -8781,10 +8785,6 @@ msgstr "" msgid "%s: downloading script \"%s\"..." msgstr "%s: descargando el script \"%s\"..." -#, c-format -msgid "%s: script \"%s\" is not installed" -msgstr "%s: el script \"%s\" no esta instalado" - #, c-format msgid "%s: script \"%s\" is held" msgstr "%s: script \"%s\" esta retenido" @@ -9551,6 +9551,10 @@ msgstr "%s%s: no ha sido posible recibir el bloque desde el transmisor" msgid "%s%s: unable to write local file" msgstr "%s%s: no es posible escribir el archivo local" +#, fuzzy, c-format +msgid "%s%s: unable to send ACK to sender" +msgstr "%s%s: no es posible conectarse al transmisor" + #, c-format msgid "%s%s: unable to fork" msgstr "%s%s: no es posible bifurcarse" diff --git a/po/fr.po b/po/fr.po index ffe736d56..3ddc07792 100644 --- a/po/fr.po +++ b/po/fr.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.1-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-02-24 22:17+0100\n" -"PO-Revision-Date: 2013-02-24 22:19+0100\n" +"POT-Creation-Date: 2013-02-26 21:38+0100\n" +"PO-Revision-Date: 2013-02-26 21:39+0100\n" "Last-Translator: Sebastien Helleu \n" "Language-Team: weechat-dev \n" "Language: French\n" @@ -9011,6 +9011,14 @@ msgstr "%s: l'extension \"%s\" n'est pas chargée" msgid "%s: script \"%s\" is not loaded" msgstr "%s: script \"%s\" non chargé" +#, c-format +msgid "%s: script \"%s\" not found" +msgstr "%s: script \"%s\" non trouvé" + +#, c-format +msgid "%s: script \"%s\" is not installed" +msgstr "%s: le script \"%s\" n'est pas installé" + #, c-format msgid "%s: autoload enabled for script \"%s\"" msgstr "%s: chargement automatique activé pour le script \"%s\"" @@ -9019,10 +9027,6 @@ msgstr "%s: chargement automatique activé pour le script \"%s\"" msgid "%s: autoload disabled for script \"%s\"" msgstr "%s: chargement automatique désactivé pour le script \"%s\"" -#, c-format -msgid "%s: script \"%s\" not found" -msgstr "%s: script \"%s\" non trouvé" - #, c-format msgid "%s%s: error downloading script \"%s\": %s" msgstr "%s%s: erreur de téléchargement du script \"%s\": %s" @@ -9038,10 +9042,6 @@ msgstr "" msgid "%s: downloading script \"%s\"..." msgstr "%s: téléchargement du script \"%s\"..." -#, c-format -msgid "%s: script \"%s\" is not installed" -msgstr "%s: le script \"%s\" n'est pas installé" - #, c-format msgid "%s: script \"%s\" is held" msgstr "%s: le script \"%s\" est figé" @@ -9924,6 +9924,10 @@ msgstr "%s%s: impossible de recevoir un bloc de l'envoyeur" msgid "%s%s: unable to write local file" msgstr "%s%s: impossible d'écrire dans le fichier local" +#, c-format +msgid "%s%s: unable to send ACK to sender" +msgstr "%s%s: impossible d'envoyer l'accusé de réception à l'envoyeur" + #, c-format msgid "%s%s: unable to fork" msgstr "%s%s: impossible de créer un processus" diff --git a/po/hu.po b/po/hu.po index 8ae914e02..d9d8b2619 100644 --- a/po/hu.po +++ b/po/hu.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.1-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-02-24 22:17+0100\n" +"POT-Creation-Date: 2013-02-26 21:38+0100\n" "PO-Revision-Date: 2013-02-23 11:11+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -7952,6 +7952,14 @@ msgstr "%s a \"%s\" szerver nem található\n" msgid "%s: script \"%s\" is not loaded" msgstr "%s a \"%s\" szerver nem található\n" +#, fuzzy, c-format +msgid "%s: script \"%s\" not found" +msgstr "%s a \"%s\" szerver nem található\n" + +#, fuzzy, c-format +msgid "%s: script \"%s\" is not installed" +msgstr "%s a \"%s\" szerver nem található\n" + #, fuzzy, c-format msgid "%s: autoload enabled for script \"%s\"" msgstr "folyamat: \"%s\" szerver betöltése\n" @@ -7960,10 +7968,6 @@ msgstr "folyamat: \"%s\" szerver betöltése\n" msgid "%s: autoload disabled for script \"%s\"" msgstr "folyamat: \"%s\" szerver betöltése\n" -#, fuzzy, c-format -msgid "%s: script \"%s\" not found" -msgstr "%s a \"%s\" szerver nem található\n" - #, fuzzy, c-format msgid "%s%s: error downloading script \"%s\": %s" msgstr "folyamat: \"%s\" szerver betöltése\n" @@ -7979,10 +7983,6 @@ msgstr "" msgid "%s: downloading script \"%s\"..." msgstr "folyamat: \"%s\" szerver betöltése\n" -#, fuzzy, c-format -msgid "%s: script \"%s\" is not installed" -msgstr "%s a \"%s\" szerver nem található\n" - #, fuzzy, c-format msgid "%s: script \"%s\" is held" msgstr "A \"%s\" modul eltávolítva.\n" @@ -8780,6 +8780,10 @@ msgstr "%s DCC: nem sikerült fogadni a küldő blokkját\n" msgid "%s%s: unable to write local file" msgstr "%s DCC: nem sikerült a helyi fájlt írni\n" +#, fuzzy, c-format +msgid "%s%s: unable to send ACK to sender" +msgstr "%s DCC: nem sikerült kapcsolódni a küldőhöz\n" + #, fuzzy, c-format msgid "%s%s: unable to fork" msgstr "%s DCC: nem sikerült forkolni\n" diff --git a/po/it.po b/po/it.po index 90b6fecc3..7f48ef131 100644 --- a/po/it.po +++ b/po/it.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.1-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-02-24 22:17+0100\n" +"POT-Creation-Date: 2013-02-26 21:38+0100\n" "PO-Revision-Date: 2013-02-23 11:11+0100\n" "Last-Translator: Marco Paolone \n" "Language-Team: weechat-dev \n" @@ -8787,6 +8787,14 @@ msgstr "%s: il plugin \"%s\" non caricato" msgid "%s: script \"%s\" is not loaded" msgstr "%s: script \"%s\" non caricato" +#, c-format +msgid "%s: script \"%s\" not found" +msgstr "%s: script \"%s\" non trovato" + +#, c-format +msgid "%s: script \"%s\" is not installed" +msgstr "%s: script \"%s\" non installato" + #, fuzzy, c-format msgid "%s: autoload enabled for script \"%s\"" msgstr "%s: linguaggio sconosciuto per lo script \"%s\"" @@ -8795,10 +8803,6 @@ msgstr "%s: linguaggio sconosciuto per lo script \"%s\"" msgid "%s: autoload disabled for script \"%s\"" msgstr "%s: linguaggio sconosciuto per lo script \"%s\"" -#, c-format -msgid "%s: script \"%s\" not found" -msgstr "%s: script \"%s\" non trovato" - #, c-format msgid "%s%s: error downloading script \"%s\": %s" msgstr "%s%s: errore durante il download dello script \"%s\": %s" @@ -8814,10 +8818,6 @@ msgstr "" msgid "%s: downloading script \"%s\"..." msgstr "%s: download dello script \"%s\"..." -#, c-format -msgid "%s: script \"%s\" is not installed" -msgstr "%s: script \"%s\" non installato" - #, fuzzy, c-format msgid "%s: script \"%s\" is held" msgstr "%s: script \"%s\" scaricato" @@ -9581,6 +9581,10 @@ msgstr "%s%s: impossibile ricevere il blocco dal mittente" msgid "%s%s: unable to write local file" msgstr "%s%s: impossibile scrivere il file locale" +#, fuzzy, c-format +msgid "%s%s: unable to send ACK to sender" +msgstr "%s%s: impossibile connettersi al mittente" + #, c-format msgid "%s%s: unable to fork" msgstr "%s%s: impossibile effettuare il fork" diff --git a/po/ja.po b/po/ja.po index 78f9ea78c..7b81073a5 100644 --- a/po/ja.po +++ b/po/ja.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.1-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-02-24 22:17+0100\n" +"POT-Creation-Date: 2013-02-26 21:38+0100\n" "PO-Revision-Date: 2013-02-23 11:11+0100\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" @@ -8695,6 +8695,14 @@ msgstr "%s: プラグイン \"%s\" はロードされていません" msgid "%s: script \"%s\" is not loaded" msgstr "%s: スクリプト \"%s\" はロードされていません" +#, c-format +msgid "%s: script \"%s\" not found" +msgstr "%s: スクリプト \"%s\" が見つかりません" + +#, c-format +msgid "%s: script \"%s\" is not installed" +msgstr "%s: スクリプト \"%s\" はインストールされていません" + #, fuzzy, c-format msgid "%s: autoload enabled for script \"%s\"" msgstr "%s: スクリプト \"%s\" は利用できない言語で書かれています" @@ -8703,10 +8711,6 @@ msgstr "%s: スクリプト \"%s\" は利用できない言語で書かれてい msgid "%s: autoload disabled for script \"%s\"" msgstr "%s: スクリプト \"%s\" は利用できない言語で書かれています" -#, c-format -msgid "%s: script \"%s\" not found" -msgstr "%s: スクリプト \"%s\" が見つかりません" - #, c-format msgid "%s%s: error downloading script \"%s\": %s" msgstr "%s%s: スクリプト \"%s\" のダウンロード中にエラーが発生: %s" @@ -8722,10 +8726,6 @@ msgstr "" msgid "%s: downloading script \"%s\"..." msgstr "%s: スクリプト \"%s\" のダウンロード中" -#, c-format -msgid "%s: script \"%s\" is not installed" -msgstr "%s: スクリプト \"%s\" はインストールされていません" - #, c-format msgid "%s: script \"%s\" is held" msgstr "%s: スクリプト \"%s\" はホールド状態です" @@ -9571,6 +9571,10 @@ msgstr "%s%s: 送信者からブロックを受信できません" msgid "%s%s: unable to write local file" msgstr "%s%s: ローカルファイルに書き込めません" +#, fuzzy, c-format +msgid "%s%s: unable to send ACK to sender" +msgstr "%s%s: 送信者に接続できません" + #, c-format msgid "%s%s: unable to fork" msgstr "%s%s: フォークできません" diff --git a/po/pl.po b/po/pl.po index 9dc30abd8..7a75ec04a 100644 --- a/po/pl.po +++ b/po/pl.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.1-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-02-24 22:17+0100\n" +"POT-Creation-Date: 2013-02-26 21:38+0100\n" "PO-Revision-Date: 2013-02-23 11:11+0100\n" "Last-Translator: Krzysztof Korościk \n" "Language-Team: weechat-dev \n" @@ -8842,6 +8842,14 @@ msgstr "%s: wtyczka \"%s\" nie załadowana" msgid "%s: script \"%s\" is not loaded" msgstr "%s: skrypt \"%s\" nie załadowany" +#, c-format +msgid "%s: script \"%s\" not found" +msgstr "%s: nie znaleziono skryptu \"%s\"" + +#, c-format +msgid "%s: script \"%s\" is not installed" +msgstr "%s: skrypt \"%s\" nie zainstalowany" + #, fuzzy, c-format msgid "%s: autoload enabled for script \"%s\"" msgstr "%s: nieznany język dla skryptu \"%s\"" @@ -8850,10 +8858,6 @@ msgstr "%s: nieznany język dla skryptu \"%s\"" msgid "%s: autoload disabled for script \"%s\"" msgstr "%s: nieznany język dla skryptu \"%s\"" -#, c-format -msgid "%s: script \"%s\" not found" -msgstr "%s: nie znaleziono skryptu \"%s\"" - #, c-format msgid "%s%s: error downloading script \"%s\": %s" msgstr "%s%s: błąd podczas pobierania skryptu \"%s\": %s" @@ -8869,10 +8873,6 @@ msgstr "" msgid "%s: downloading script \"%s\"..." msgstr "%s: pobieram skrypt \"%s\"..." -#, c-format -msgid "%s: script \"%s\" is not installed" -msgstr "%s: skrypt \"%s\" nie zainstalowany" - #, c-format msgid "%s: script \"%s\" is held" msgstr "%s: skrypt \"%s\" wystrzymano" @@ -9725,6 +9725,10 @@ msgstr "%s%s: nie można otrzymać bloku od nadawcy" msgid "%s%s: unable to write local file" msgstr "%s%s: nie można zapisać pliku" +#, fuzzy, c-format +msgid "%s%s: unable to send ACK to sender" +msgstr "%s%s: nie można połączyć z nadawcą" + #, c-format msgid "%s%s: unable to fork" msgstr "%s%s: nie można uruchomić procesu potomnego" diff --git a/po/pt_BR.po b/po/pt_BR.po index f37a6e624..38f528ecb 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.1-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-02-24 22:17+0100\n" +"POT-Creation-Date: 2013-02-26 21:38+0100\n" "PO-Revision-Date: 2013-02-23 11:12+0100\n" "Last-Translator: Sergio Durigan Junior \n" "Language-Team: weechat-dev \n" @@ -8117,6 +8117,14 @@ msgstr "%s%s: script \"%s\" não carregado" msgid "%s: script \"%s\" is not loaded" msgstr "%s%s: script \"%s\" não carregado" +#, fuzzy, c-format +msgid "%s: script \"%s\" not found" +msgstr "%s%s: script \"%s\" não encontrado" + +#, fuzzy, c-format +msgid "%s: script \"%s\" is not installed" +msgstr "%s%s: script \"%s\" não carregado" + #, fuzzy, c-format msgid "%s: autoload enabled for script \"%s\"" msgstr "%s: descarregando script \"%s\"" @@ -8125,10 +8133,6 @@ msgstr "%s: descarregando script \"%s\"" msgid "%s: autoload disabled for script \"%s\"" msgstr "%s: descarregando script \"%s\"" -#, fuzzy, c-format -msgid "%s: script \"%s\" not found" -msgstr "%s%s: script \"%s\" não encontrado" - #, fuzzy, c-format msgid "%s%s: error downloading script \"%s\": %s" msgstr "%s: descarregando script \"%s\"" @@ -8143,10 +8147,6 @@ msgstr "" msgid "%s: downloading script \"%s\"..." msgstr "%s: descarregando script \"%s\"" -#, fuzzy, c-format -msgid "%s: script \"%s\" is not installed" -msgstr "%s%s: script \"%s\" não carregado" - #, fuzzy, c-format msgid "%s: script \"%s\" is held" msgstr "%s: script \"%s\" descarregado" @@ -8936,6 +8936,10 @@ msgstr "%s%s: não foi possível receber dado do remetente" msgid "%s%s: unable to write local file" msgstr "%s%s: não foi possível escrever o arquivo local" +#, fuzzy, c-format +msgid "%s%s: unable to send ACK to sender" +msgstr "%s%s: não foi possível conectar ao remetente" + #, c-format msgid "%s%s: unable to fork" msgstr "%s%s: não foi possível efetuar o fork" diff --git a/po/ru.po b/po/ru.po index eef3ff3de..242842de9 100644 --- a/po/ru.po +++ b/po/ru.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.1-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-02-24 22:17+0100\n" +"POT-Creation-Date: 2013-02-26 21:38+0100\n" "PO-Revision-Date: 2013-02-23 11:12+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -7975,6 +7975,14 @@ msgstr "%s сервер \"%s\" не найден\n" msgid "%s: script \"%s\" is not loaded" msgstr "%s сервер \"%s\" не найден\n" +#, fuzzy, c-format +msgid "%s: script \"%s\" not found" +msgstr "%s сервер \"%s\" не найден\n" + +#, fuzzy, c-format +msgid "%s: script \"%s\" is not installed" +msgstr "%s сервер \"%s\" не найден\n" + #, fuzzy, c-format msgid "%s: autoload enabled for script \"%s\"" msgstr "сессия: загружаю сервер \"%s\"\n" @@ -7983,10 +7991,6 @@ msgstr "сессия: загружаю сервер \"%s\"\n" msgid "%s: autoload disabled for script \"%s\"" msgstr "сессия: загружаю сервер \"%s\"\n" -#, fuzzy, c-format -msgid "%s: script \"%s\" not found" -msgstr "%s сервер \"%s\" не найден\n" - #, fuzzy, c-format msgid "%s%s: error downloading script \"%s\": %s" msgstr "сессия: загружаю сервер \"%s\"\n" @@ -8002,10 +8006,6 @@ msgstr "" msgid "%s: downloading script \"%s\"..." msgstr "сессия: загружаю сервер \"%s\"\n" -#, fuzzy, c-format -msgid "%s: script \"%s\" is not installed" -msgstr "%s сервер \"%s\" не найден\n" - #, fuzzy, c-format msgid "%s: script \"%s\" is held" msgstr "Plugin \"%s\" выгружен.\n" @@ -8799,6 +8799,10 @@ msgstr "%s DCC: не могу получить блок от отправите msgid "%s%s: unable to write local file" msgstr "%s DCC: не могу записать локальный файл\n" +#, fuzzy, c-format +msgid "%s%s: unable to send ACK to sender" +msgstr "%s DCC: не могу соединиться с отправителем\n" + #, fuzzy, c-format msgid "%s%s: unable to fork" msgstr "%s DCC: не могу forkнуться\n" diff --git a/po/weechat.pot b/po/weechat.pot index eb0ce4384..332ff7417 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.1-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-02-24 22:17+0100\n" +"POT-Creation-Date: 2013-02-26 21:38+0100\n" "PO-Revision-Date: 2013-02-14 18:20+0100\n" "Last-Translator: FULL NAME \n" "Language-Team: weechat-dev \n" @@ -7045,6 +7045,14 @@ msgstr "" msgid "%s: script \"%s\" is not loaded" msgstr "" +#, c-format +msgid "%s: script \"%s\" not found" +msgstr "" + +#, c-format +msgid "%s: script \"%s\" is not installed" +msgstr "" + #, c-format msgid "%s: autoload enabled for script \"%s\"" msgstr "" @@ -7053,10 +7061,6 @@ msgstr "" msgid "%s: autoload disabled for script \"%s\"" msgstr "" -#, c-format -msgid "%s: script \"%s\" not found" -msgstr "" - #, c-format msgid "%s%s: error downloading script \"%s\": %s" msgstr "" @@ -7070,10 +7074,6 @@ msgstr "" msgid "%s: downloading script \"%s\"..." msgstr "" -#, c-format -msgid "%s: script \"%s\" is not installed" -msgstr "" - #, c-format msgid "%s: script \"%s\" is held" msgstr "" @@ -7780,6 +7780,10 @@ msgstr "" msgid "%s%s: unable to write local file" msgstr "" +#, c-format +msgid "%s%s: unable to send ACK to sender" +msgstr "" + #, c-format msgid "%s%s: unable to fork" msgstr "" diff --git a/src/plugins/xfer/xfer-dcc.c b/src/plugins/xfer/xfer-dcc.c index 1c12ca9b6..644518ad9 100644 --- a/src/plugins/xfer/xfer-dcc.c +++ b/src/plugins/xfer/xfer-dcc.c @@ -179,9 +179,10 @@ xfer_dcc_send_file_child (struct t_xfer *xfer) void xfer_dcc_recv_file_child (struct t_xfer *xfer) { - int num_read; + int flags, num_read, num_sent, total_sent, length; static char buffer[XFER_BLOCKSIZE_MAX]; uint32_t pos; + const void *ptr_buf; time_t last_sent, new_time; unsigned long long bytes_remaining; @@ -198,6 +199,12 @@ xfer_dcc_recv_file_child (struct t_xfer *xfer) xfer_network_write_pipe (xfer, XFER_STATUS_ACTIVE, XFER_NO_ERROR); + /* make socket non-blocking */ + flags = fcntl (xfer->sock, F_GETFL); + if (flags == -1) + flags = 0; + fcntl (xfer->sock, F_SETFL, flags | O_NONBLOCK); + last_sent = time (NULL); while (1) { @@ -236,8 +243,28 @@ xfer_dcc_recv_file_child (struct t_xfer *xfer) xfer->pos += (unsigned long long) num_read; pos = htonl (xfer->pos); - /* we don't check return code, not a problem if an ACK send failed */ - send (xfer->sock, (char *) &pos, 4, 0); + /* send the ACK (and ensure the 4 bytes are sent) */ + ptr_buf = &pos; + length = 4; + total_sent = 0; + num_sent = send (xfer->sock, ptr_buf, length, 0); + if (num_sent > 0) + total_sent += num_sent; + while (total_sent < length) + { + if ((num_sent == -1) && (errno != EAGAIN) + && (errno != EWOULDBLOCK)) + { + xfer_network_write_pipe (xfer, XFER_STATUS_FAILED, + XFER_ERROR_SEND_ACK); + return; + } + usleep (1000); + num_sent = send (xfer->sock, ptr_buf + total_sent, + length - total_sent, 0); + if (num_sent > 0) + total_sent += num_sent; + } /* file received ok? */ if (xfer->pos >= xfer->size) diff --git a/src/plugins/xfer/xfer-network.c b/src/plugins/xfer/xfer-network.c index 754e0b319..8aea10180 100644 --- a/src/plugins/xfer/xfer-network.c +++ b/src/plugins/xfer/xfer-network.c @@ -146,6 +146,11 @@ xfer_network_child_read_cb (void *arg_xfer, int fd) _("%s%s: unable to write local file"), weechat_prefix ("error"), XFER_PLUGIN_NAME); break; + case XFER_ERROR_SEND_ACK: + weechat_printf (NULL, + _("%s%s: unable to send ACK to sender"), + weechat_prefix ("error"), XFER_PLUGIN_NAME); + break; } /* read new DCC status */ diff --git a/src/plugins/xfer/xfer.h b/src/plugins/xfer/xfer.h index 99de6bdc5..a0773ed24 100644 --- a/src/plugins/xfer/xfer.h +++ b/src/plugins/xfer/xfer.h @@ -66,12 +66,15 @@ enum t_xfer_status enum t_xfer_error { XFER_NO_ERROR = 0, /* no error to report, all ok! */ + /* errors for sender: */ XFER_ERROR_READ_LOCAL, /* unable to read local file */ XFER_ERROR_SEND_BLOCK, /* unable to send block to receiver */ XFER_ERROR_READ_ACK, /* unable to read ACK from receiver */ + /* errors for receiver: */ XFER_ERROR_CONNECT_SENDER, /* unable to connect to sender */ XFER_ERROR_RECV_BLOCK, /* unable to recv block from sender */ XFER_ERROR_WRITE_LOCAL, /* unable to write to local file */ + XFER_ERROR_SEND_ACK, /* unable to send ACK to sender */ /* number of errors */ XFER_NUM_ERRORS, };