diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2012-03-23 18:24:47 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2012-03-23 18:24:47 +0100 |
commit | 9972cce777852c59c4ba3226d52cec83565b1dd9 (patch) | |
tree | ca8e8e67885269a9610fe2eb7d8b508b33a6cfea | |
parent | 4474f9ca0e7d0eca0edfeae6310594b2436a1b03 (diff) | |
download | weechat-9972cce777852c59c4ba3226d52cec83565b1dd9.zip |
core: add a connection timeout for child process in hook_connect (bug #35966)
37 files changed, 248 insertions, 19 deletions
@@ -1,12 +1,13 @@ WeeChat ChangeLog ================= Sébastien Helleu <flashcode@flashtux.org> -v0.3.8-dev, 2012-03-21 +v0.3.8-dev, 2012-03-23 Version 0.3.8 (under dev!) -------------------------- +* core: add a connection timeout for child process in hook_connect (bug #35966) * core: follow symbolic links when writing configuration files (.conf) (task #11779) * core: fix lost scroll when switching to a buffer with a pending search diff --git a/doc/de/autogen/user/weechat_options.txt b/doc/de/autogen/user/weechat_options.txt index 9fa2db51f..ed2e27b12 100644 --- a/doc/de/autogen/user/weechat_options.txt +++ b/doc/de/autogen/user/weechat_options.txt @@ -723,6 +723,11 @@ ** Typ: Zeichenkette ** Werte: beliebige Zeichenkette (Standardwert: `"%a, %d %b %Y %T"`) +* [[option_weechat.network.connection_timeout]] *weechat.network.connection_timeout* +** Beschreibung: `timeout (in seconds) for connection to a remote host (made in a child process)` +** Typ: integer +** Werte: 1 .. 2147483647 (Standardwert: `60`) + * [[option_weechat.network.gnutls_ca_file]] *weechat.network.gnutls_ca_file* ** Beschreibung: `Datei beinhaltet die digitalen Zertifikate ("%h" wird durch das WeeChat Verzeichnis ersetzt, Standardverzeichnis: "~/.weechat")` ** Typ: Zeichenkette diff --git a/doc/de/weechat_scripting.de.txt b/doc/de/weechat_scripting.de.txt index a07400044..3f7e73c44 100644 --- a/doc/de/weechat_scripting.de.txt +++ b/doc/de/weechat_scripting.de.txt @@ -391,7 +391,7 @@ Liste der Konstanten in Skript API: WEECHAT_HOOK_CONNECT_IP_ADDRESS_NOT_FOUND, WEECHAT_HOOK_CONNECT_CONNECTION_REFUSED, WEECHAT_HOOK_CONNECT_PROXY_ERROR, WEECHAT_HOOK_CONNECT_LOCAL_HOSTNAME_ERROR, WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR, WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR, - WEECHAT_HOOK_CONNECT_MEMORY_ERROR + WEECHAT_HOOK_CONNECT_MEMORY_ERROR, WEECHAT_HOOK_CONNECT_TIMEOUT | hook Signal | WEECHAT_HOOK_SIGNAL_STRING, WEECHAT_HOOK_SIGNAL_INT, WEECHAT_HOOK_SIGNAL_POINTER |======================================== diff --git a/doc/en/autogen/user/weechat_options.txt b/doc/en/autogen/user/weechat_options.txt index 11c2d3b7d..ccc52e773 100644 --- a/doc/en/autogen/user/weechat_options.txt +++ b/doc/en/autogen/user/weechat_options.txt @@ -723,6 +723,11 @@ ** type: string ** values: any string (default value: `"%a, %d %b %Y %T"`) +* [[option_weechat.network.connection_timeout]] *weechat.network.connection_timeout* +** description: `timeout (in seconds) for connection to a remote host (made in a child process)` +** type: integer +** values: 1 .. 2147483647 (default value: `60`) + * [[option_weechat.network.gnutls_ca_file]] *weechat.network.gnutls_ca_file* ** description: `file containing the certificate authorities ("%h" will be replaced by WeeChat home, "~/.weechat" by default)` ** type: string diff --git a/doc/en/weechat_plugin_api.en.txt b/doc/en/weechat_plugin_api.en.txt index c90fdf16c..f1f09a5f4 100644 --- a/doc/en/weechat_plugin_api.en.txt +++ b/doc/en/weechat_plugin_api.en.txt @@ -7090,6 +7090,7 @@ Arguments: *** 'WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR': GnuTLS init error *** 'WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR': GnuTLS handshake error *** 'WEECHAT_HOOK_CONNECT_MEMORY_ERROR': insufficient memory +*** 'WEECHAT_HOOK_CONNECT_TIMEOUT': timeout ** 'gnutls_rc': result value of 'gnutls_handshake()' ** 'const char *error': result value of 'gnutls_strerror(gnutls_rc)' ** 'const char *ip_address': IP address found @@ -7139,6 +7140,9 @@ my_connect_cb (void *data, int status, int gnutls_rc, const char *error, case WEECHAT_HOOK_CONNECT_MEMORY_ERROR: /* ... */ break; + case WEECHAT_HOOK_CONNECT_TIMEOUT: + /* ... */ + break; } return WEECHAT_RC_OK; } @@ -7179,6 +7183,8 @@ def my_connect_cb(data, status, gnutls_rc, error, ip_address): # ... elif status == WEECHAT_HOOK_CONNECT_MEMORY_ERROR: # ... + elif status == WEECHAT_HOOK_CONNECT_TIMEOUT: + # ... return weechat.WEECHAT_RC_OK hook = weechat.hook_connect("", "my.server.org", 1234, sock, 0, "", diff --git a/doc/en/weechat_scripting.en.txt b/doc/en/weechat_scripting.en.txt index 880732b8d..83466b437 100644 --- a/doc/en/weechat_scripting.en.txt +++ b/doc/en/weechat_scripting.en.txt @@ -385,7 +385,7 @@ List of constants in script API: WEECHAT_HOOK_CONNECT_IP_ADDRESS_NOT_FOUND, WEECHAT_HOOK_CONNECT_CONNECTION_REFUSED, WEECHAT_HOOK_CONNECT_PROXY_ERROR, WEECHAT_HOOK_CONNECT_LOCAL_HOSTNAME_ERROR, WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR, WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR, - WEECHAT_HOOK_CONNECT_MEMORY_ERROR + WEECHAT_HOOK_CONNECT_MEMORY_ERROR, WEECHAT_HOOK_CONNECT_TIMEOUT | hook signal | WEECHAT_HOOK_SIGNAL_STRING, WEECHAT_HOOK_SIGNAL_INT, WEECHAT_HOOK_SIGNAL_POINTER |======================================== diff --git a/doc/fr/autogen/user/weechat_options.txt b/doc/fr/autogen/user/weechat_options.txt index 97a378665..082c2ad3e 100644 --- a/doc/fr/autogen/user/weechat_options.txt +++ b/doc/fr/autogen/user/weechat_options.txt @@ -723,6 +723,11 @@ ** type: chaîne ** valeurs: toute chaîne (valeur par défaut: `"%a, %d %b %Y %T"`) +* [[option_weechat.network.connection_timeout]] *weechat.network.connection_timeout* +** description: `délai d'attente maximum (en secondes) pour la connexion à une machine distante (effectuée dans un processus fils)` +** type: entier +** valeurs: 1 .. 2147483647 (valeur par défaut: `60`) + * [[option_weechat.network.gnutls_ca_file]] *weechat.network.gnutls_ca_file* ** description: `fichier contenant les autorités de certification ("%h" sera remplacé par le répertoire de base WeeChat, par défaut: "~/.weechat")` ** type: chaîne diff --git a/doc/fr/weechat_plugin_api.fr.txt b/doc/fr/weechat_plugin_api.fr.txt index 34c9e9a37..71ebbc97c 100644 --- a/doc/fr/weechat_plugin_api.fr.txt +++ b/doc/fr/weechat_plugin_api.fr.txt @@ -7196,6 +7196,7 @@ Paramètres : *** 'WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR' : erreur avec la "poignée de main" GnuTLS *** 'WEECHAT_HOOK_CONNECT_MEMORY_ERROR' : mémoire insuffisante +*** 'WEECHAT_HOOK_CONNECT_TIMEOUT' : temps maximum dépassé ** 'gnutls_rc' : valeur retour de 'gnutls_handshake()' ** 'const char *error' : valeur retour de 'gnutls_strerror(gnutls_rc)' ** 'const char *ip_address' : adresse IP trouvée @@ -7246,6 +7247,9 @@ my_connect_cb (void *data, int status, int gnutls_rc, const char *error, case WEECHAT_HOOK_CONNECT_MEMORY_ERROR: /* ... */ break; + case WEECHAT_HOOK_CONNECT_TIMEOUT: + /* ... */ + break; } return WEECHAT_RC_OK; } @@ -7286,6 +7290,8 @@ def my_connect_cb(data, status, gnutls_rc, error, ip_address): # ... elif status == WEECHAT_HOOK_CONNECT_MEMORY_ERROR: # ... + elif status == WEECHAT_HOOK_CONNECT_TIMEOUT: + # ... return weechat.WEECHAT_RC_OK hook = weechat.hook_connect("", "my.server.org", 1234, sock, 0, "", diff --git a/doc/fr/weechat_scripting.fr.txt b/doc/fr/weechat_scripting.fr.txt index 7936090c0..223d31f14 100644 --- a/doc/fr/weechat_scripting.fr.txt +++ b/doc/fr/weechat_scripting.fr.txt @@ -394,7 +394,7 @@ Liste des constantes de l'API script : WEECHAT_HOOK_CONNECT_IP_ADDRESS_NOT_FOUND, WEECHAT_HOOK_CONNECT_CONNECTION_REFUSED, WEECHAT_HOOK_CONNECT_PROXY_ERROR, WEECHAT_HOOK_CONNECT_LOCAL_HOSTNAME_ERROR, WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR, WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR, - WEECHAT_HOOK_CONNECT_MEMORY_ERROR + WEECHAT_HOOK_CONNECT_MEMORY_ERROR, WEECHAT_HOOK_CONNECT_TIMEOUT | hook signal | WEECHAT_HOOK_SIGNAL_STRING, WEECHAT_HOOK_SIGNAL_INT, WEECHAT_HOOK_SIGNAL_POINTER |======================================== diff --git a/doc/it/autogen/user/weechat_options.txt b/doc/it/autogen/user/weechat_options.txt index 9664bea49..2e58e0046 100644 --- a/doc/it/autogen/user/weechat_options.txt +++ b/doc/it/autogen/user/weechat_options.txt @@ -723,6 +723,11 @@ ** tipo: stringa ** valori: qualsiasi stringa (valore predefinito: `"%a, %d %b %Y %T"`) +* [[option_weechat.network.connection_timeout]] *weechat.network.connection_timeout* +** descrizione: `timeout (in seconds) for connection to a remote host (made in a child process)` +** tipo: intero +** valori: 1 .. 2147483647 (valore predefinito: `60`) + * [[option_weechat.network.gnutls_ca_file]] *weechat.network.gnutls_ca_file* ** descrizione: `file contenente le autorità certificative ("%h" sarà sostituito dalla home di WeeChat, "~/.weechat come predefinita)` ** tipo: stringa diff --git a/doc/it/weechat_plugin_api.it.txt b/doc/it/weechat_plugin_api.it.txt index 8458b8856..54f1f299e 100644 --- a/doc/it/weechat_plugin_api.it.txt +++ b/doc/it/weechat_plugin_api.it.txt @@ -7114,6 +7114,8 @@ Argomenti: *** 'WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR': errore inizializzazione GnuTLS *** 'WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR': errore di handshake GnuTLS *** 'WEECHAT_HOOK_CONNECT_MEMORY_ERROR': memoria insufficiente +// TRANSLATION MISSING +*** 'WEECHAT_HOOK_CONNECT_TIMEOUT': timeout ** 'gnutls_rc': valore del risultato di 'gnutls_handshake()' ** 'const char *error': valore del risultato di 'gnutls_strerror(gnutls_rc)' ** 'const char *ip_address': indirizzo IP trovato @@ -7163,6 +7165,9 @@ my_connect_cb (void *data, int status, int gnutls_rc, const char *error, case WEECHAT_HOOK_CONNECT_MEMORY_ERROR: /* ... */ break; + case WEECHAT_HOOK_CONNECT_TIMEOUT: + /* ... */ + break; } return WEECHAT_RC_OK; } @@ -7203,6 +7208,8 @@ def my_connect_cb(data, status, gnutls_rc, error, ip_address): # ... elif status == WEECHAT_HOOK_CONNECT_MEMORY_ERROR: # ... + elif status == WEECHAT_HOOK_CONNECT_TIMEOUT: + # ... return weechat.WEECHAT_RC_OK hook = weechat.hook_connect("", "my.server.org", 1234, sock, 0, "", diff --git a/doc/it/weechat_scripting.it.txt b/doc/it/weechat_scripting.it.txt index efec57218..416c29a34 100644 --- a/doc/it/weechat_scripting.it.txt +++ b/doc/it/weechat_scripting.it.txt @@ -393,7 +393,7 @@ Elenco di costanti nelle API per gli script: WEECHAT_HOOK_CONNECT_IP_ADDRESS_NOT_FOUND, WEECHAT_HOOK_CONNECT_CONNECTION_REFUSED, WEECHAT_HOOK_CONNECT_PROXY_ERROR, WEECHAT_HOOK_CONNECT_LOCAL_HOSTNAME_ERROR, WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR, WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR, - WEECHAT_HOOK_CONNECT_MEMORY_ERROR + WEECHAT_HOOK_CONNECT_MEMORY_ERROR, WEECHAT_HOOK_CONNECT_TIMEOUT | hook su segnale | WEECHAT_HOOK_SIGNAL_STRING, WEECHAT_HOOK_SIGNAL_INT, WEECHAT_HOOK_SIGNAL_POINTER |======================================== diff --git a/doc/pl/weechat_scripting.pl.txt b/doc/pl/weechat_scripting.pl.txt index 30feca9fb..c91c77fc4 100644 --- a/doc/pl/weechat_scripting.pl.txt +++ b/doc/pl/weechat_scripting.pl.txt @@ -383,7 +383,7 @@ Lista stałych w API skryptów: WEECHAT_HOOK_CONNECT_IP_ADDRESS_NOT_FOUND, WEECHAT_HOOK_CONNECT_CONNECTION_REFUSED, WEECHAT_HOOK_CONNECT_PROXY_ERROR, WEECHAT_HOOK_CONNECT_LOCAL_HOSTNAME_ERROR, WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR, WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR, - WEECHAT_HOOK_CONNECT_MEMORY_ERROR + WEECHAT_HOOK_CONNECT_MEMORY_ERROR, WEECHAT_HOOK_CONNECT_TIMEOUT | hook signal | WEECHAT_HOOK_SIGNAL_STRING, WEECHAT_HOOK_SIGNAL_INT, WEECHAT_HOOK_SIGNAL_POINTER |======================================== @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.8-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-03-12 10:27+0100\n" +"POT-Creation-Date: 2012-03-23 18:09+0100\n" "PO-Revision-Date: 2012-02-26 09:16+0100\n" "Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -2906,6 +2906,12 @@ msgstr "" "maximální počet příkazů, který zobrazit jako výchozí v seznamu historie (0 = " "nekonečno)" +#, fuzzy +msgid "" +"timeout (in seconds) for connection to a remote host (made in a child " +"process)" +msgstr "časový limit (v sekundách) pro gnutls handshake" + msgid "" "file containing the certificate authorities (\"%h\" will be replaced by " "WeeChat home, \"~/.weechat\" by default)" @@ -6610,6 +6616,10 @@ msgstr "" msgid "%s%s: not enough memory" msgstr "%s%s: nedostatek paměti" +#, fuzzy, c-format +msgid "%s%s: timeout" +msgstr "%s%s: vypršel časový limit \"%s\" pro %s" + #, c-format msgid "gnutls: connected using %d-bit Diffie-Hellman shared secret exchange" msgstr "" @@ -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-03-13 16:35+0100\n" +"POT-Creation-Date: 2012-03-23 18:09+0100\n" "PO-Revision-Date: 2012-03-13 16:36+0100\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Language-Team: German <weechatter@arcor.de>\n" @@ -3200,6 +3200,12 @@ msgstr "" "Wert für die maximale Anzahl der angezeigten Befehle im Verlaufsspeicher, " "die mittels /history angezeigt werden (0: unbegrenzt)" +#, fuzzy +msgid "" +"timeout (in seconds) for connection to a remote host (made in a child " +"process)" +msgstr "Zeitüberschreitung für gnutls handshake (in Sekunden)" + msgid "" "file containing the certificate authorities (\"%h\" will be replaced by " "WeeChat home, \"~/.weechat\" by default)" @@ -7086,6 +7092,10 @@ msgstr "" msgid "%s%s: not enough memory" msgstr "%s%s: Nicht genügend Speicher" +#, fuzzy, c-format +msgid "%s%s: timeout" +msgstr "%s%s: Zeitüberschreitung für \"%s\" mit %s" + #, c-format msgid "gnutls: connected using %d-bit Diffie-Hellman shared secret exchange" msgstr "" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.8-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-03-12 10:27+0100\n" +"POT-Creation-Date: 2012-03-23 18:09+0100\n" "PO-Revision-Date: 2012-02-26 09:16+0100\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3070,6 +3070,12 @@ msgstr "" "número máximo de comandos para mostrar por defecto en el listado del " "historial (0 = ilimitado)" +#, fuzzy +msgid "" +"timeout (in seconds) for connection to a remote host (made in a child " +"process)" +msgstr "tiempo de espera (en segundos) para el saludo gnutls" + msgid "" "file containing the certificate authorities (\"%h\" will be replaced by " "WeeChat home, \"~/.weechat\" by default)" @@ -6845,6 +6851,10 @@ msgstr "" msgid "%s%s: not enough memory" msgstr "%s%s: no hay suficiente memoria" +#, fuzzy, c-format +msgid "%s%s: timeout" +msgstr "%s%s: tiempo de espera máximo para \"%s\" con %s" + #, c-format msgid "gnutls: connected using %d-bit Diffie-Hellman shared secret exchange" msgstr "gnutls: conectado usando %d-bit Diffie-Hellman" @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.8-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-03-12 10:27+0100\n" -"PO-Revision-Date: 2012-03-12 10:28+0100\n" +"POT-Creation-Date: 2012-03-23 18:09+0100\n" +"PO-Revision-Date: 2012-03-23 13:29+0100\n" "Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: French\n" @@ -3106,6 +3106,13 @@ msgstr "" "d'historique (0 = sans limite)" msgid "" +"timeout (in seconds) for connection to a remote host (made in a child " +"process)" +msgstr "" +"délai d'attente maximum (en secondes) pour la connexion à une machine " +"distante (effectuée dans un processus fils)" + +msgid "" "file containing the certificate authorities (\"%h\" will be replaced by " "WeeChat home, \"~/.weechat\" by default)" msgstr "" @@ -6911,6 +6918,10 @@ msgid "%s%s: not enough memory" msgstr "%s%s: pas assez de mémoire" #, c-format +msgid "%s%s: timeout" +msgstr "%s%s: délai d'attente dépassé" + +#, c-format msgid "gnutls: connected using %d-bit Diffie-Hellman shared secret exchange" msgstr "" "gnutls: connecté en utilisant un échange secret Diffie-Hellman de %d bits" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.8-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-03-12 10:27+0100\n" +"POT-Creation-Date: 2012-03-23 18:09+0100\n" "PO-Revision-Date: 2012-02-26 09:16+0100\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -2574,6 +2574,12 @@ msgstr "" #, fuzzy msgid "" +"timeout (in seconds) for connection to a remote host (made in a child " +"process)" +msgstr "SSL használata a a kapcsolathoz" + +#, fuzzy +msgid "" "file containing the certificate authorities (\"%h\" will be replaced by " "WeeChat home, \"~/.weechat\" by default)" msgstr "" @@ -6170,6 +6176,10 @@ msgstr "" msgid "%s%s: not enough memory" msgstr "Nincs elég memória az új sorhoz\n" +#, fuzzy, c-format +msgid "%s%s: timeout" +msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n" + #, c-format msgid "gnutls: connected using %d-bit Diffie-Hellman shared secret exchange" msgstr "" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.8-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-03-12 10:27+0100\n" +"POT-Creation-Date: 2012-03-23 18:09+0100\n" "PO-Revision-Date: 2012-02-26 09:16+0100\n" "Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3065,6 +3065,12 @@ msgstr "" "numero massimo predefinito di comandi da visualizzare nella cronologia (0 = " "nessun limite)" +#, fuzzy +msgid "" +"timeout (in seconds) for connection to a remote host (made in a child " +"process)" +msgstr "timeout (in secondi) per l'handshake di gnutls" + msgid "" "file containing the certificate authorities (\"%h\" will be replaced by " "WeeChat home, \"~/.weechat\" by default)" @@ -6839,6 +6845,10 @@ msgstr "" msgid "%s%s: not enough memory" msgstr "%s%s: memoria non sufficiente" +#, fuzzy, c-format +msgid "%s%s: timeout" +msgstr "%s%s: timeout per \"%s\" con %s" + #, c-format msgid "gnutls: connected using %d-bit Diffie-Hellman shared secret exchange" msgstr "" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.8-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-03-12 10:27+0100\n" +"POT-Creation-Date: 2012-03-23 18:09+0100\n" "PO-Revision-Date: 2012-02-26 09:16+0100\n" "Last-Translator: \"AYANOKOUZI, Ryuunosuke\" <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese\n" @@ -2985,6 +2985,12 @@ msgid "" msgstr "" "履歴をリストアップする際にデフォルトで表示するコマンドの最大数 (0 = 制限無し)" +#, fuzzy +msgid "" +"timeout (in seconds) for connection to a remote host (made in a child " +"process)" +msgstr "gnutls ハンドシェイクのタイムアウト (秒単位)" + msgid "" "file containing the certificate authorities (\"%h\" will be replaced by " "WeeChat home, \"~/.weechat\" by default)" @@ -6672,6 +6678,10 @@ msgstr "" msgid "%s%s: not enough memory" msgstr "%s%s: メモリが足りません" +#, fuzzy, c-format +msgid "%s%s: timeout" +msgstr "%s%s: \"%s\" のタイムアウト %s" + #, c-format msgid "gnutls: connected using %d-bit Diffie-Hellman shared secret exchange" msgstr "gnutls: %d-ビット Diffie-Hellman 共有鍵交換を使って接続中" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.8-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-03-12 10:27+0100\n" +"POT-Creation-Date: 2012-03-23 18:09+0100\n" "PO-Revision-Date: 2012-02-26 09:16+0100\n" "Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3061,6 +3061,12 @@ msgstr "" "maksymalna ilość komend domyślnie wyświetlanych w listingu historii (0 = bez " "ograniczeń)" +#, fuzzy +msgid "" +"timeout (in seconds) for connection to a remote host (made in a child " +"process)" +msgstr "czas oczekiwania (w sekundach) na uwierzytelnienie gnutls" + msgid "" "file containing the certificate authorities (\"%h\" will be replaced by " "WeeChat home, \"~/.weechat\" by default)" @@ -6802,6 +6808,10 @@ msgstr "" msgid "%s%s: not enough memory" msgstr "%s%s: za mało pamięci" +#, fuzzy, c-format +msgid "%s%s: timeout" +msgstr "%s%s: przekroczono czas na \"%s\" z %s" + #, c-format msgid "gnutls: connected using %d-bit Diffie-Hellman shared secret exchange" msgstr "gnutls: połączono używając %d-bitowego klucza Diffie-Hellmana" diff --git a/po/pt_BR.po b/po/pt_BR.po index 6924469fe..d5a46e860 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.8-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-03-12 10:27+0100\n" +"POT-Creation-Date: 2012-03-23 18:09+0100\n" "PO-Revision-Date: 2012-02-26 09:16+0100\n" "Last-Translator: Sergio Durigan Junior <sergiosdj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3002,6 +3002,13 @@ msgstr "" "número máximo de comandos para mostrar por padrão na listagem de histórico " "(0 = ilimitado)" +# better not translate handshake +#, fuzzy +msgid "" +"timeout (in seconds) for connection to a remote host (made in a child " +"process)" +msgstr "tempo de espera (em segundos) pelo handshake do gnutls" + msgid "" "file containing the certificate authorities (\"%h\" will be replaced by " "WeeChat home, \"~/.weechat\" by default)" @@ -6315,6 +6322,10 @@ msgstr "" msgid "%s%s: not enough memory" msgstr "%s%s: memória insuficiente" +#, fuzzy, c-format +msgid "%s%s: timeout" +msgstr "%s%s: tempo esgotado para \"%s\" com %s" + #, c-format msgid "gnutls: connected using %d-bit Diffie-Hellman shared secret exchange" msgstr "" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.8-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-03-12 10:27+0100\n" +"POT-Creation-Date: 2012-03-23 18:09+0100\n" "PO-Revision-Date: 2012-02-26 09:16+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -2598,6 +2598,12 @@ msgstr "" #, fuzzy msgid "" +"timeout (in seconds) for connection to a remote host (made in a child " +"process)" +msgstr "использовать SSL при связи с сервером" + +#, fuzzy +msgid "" "file containing the certificate authorities (\"%h\" will be replaced by " "WeeChat home, \"~/.weechat\" by default)" msgstr "" @@ -6199,6 +6205,10 @@ msgstr "" msgid "%s%s: not enough memory" msgstr "Недостаточно памяти для новой строчки\n" +#, fuzzy, c-format +msgid "%s%s: timeout" +msgstr "%s нет аргумента для параметра \"%s\"\n" + #, c-format msgid "gnutls: connected using %d-bit Diffie-Hellman shared secret exchange" msgstr "" diff --git a/po/weechat.pot b/po/weechat.pot index 137cb0434..b78a469c3 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-03-12 10:27+0100\n" +"POT-Creation-Date: 2012-03-23 18:09+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -2247,6 +2247,11 @@ msgid "" msgstr "" msgid "" +"timeout (in seconds) for connection to a remote host (made in a child " +"process)" +msgstr "" + +msgid "" "file containing the certificate authorities (\"%h\" will be replaced by " "WeeChat home, \"~/.weechat\" by default)" msgstr "" @@ -5393,6 +5398,10 @@ msgid "%s%s: not enough memory" msgstr "" #, c-format +msgid "%s%s: timeout" +msgstr "" + +#, c-format msgid "gnutls: connected using %d-bit Diffie-Hellman shared secret exchange" msgstr "" diff --git a/src/core/wee-config.c b/src/core/wee-config.c index 228cbc934..8d6970f21 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -227,6 +227,7 @@ struct t_config_option *config_history_display_default; /* config, network section */ +struct t_config_option *config_network_connection_timeout; struct t_config_option *config_network_gnutls_ca_file; struct t_config_option *config_network_gnutls_handshake_timeout; @@ -2645,6 +2646,12 @@ config_weechat_init_options () return 0; } + config_network_connection_timeout = config_file_new_option ( + weechat_config_file, ptr_section, + "connection_timeout", "integer", + N_("timeout (in seconds) for connection to a remote host (made in a " + "child process)"), + NULL, 1, INT_MAX, "60", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL); config_network_gnutls_ca_file = config_file_new_option ( weechat_config_file, ptr_section, "gnutls_ca_file", "string", diff --git a/src/core/wee-config.h b/src/core/wee-config.h index 95c1c2428..c08dfb1f0 100644 --- a/src/core/wee-config.h +++ b/src/core/wee-config.h @@ -243,6 +243,7 @@ extern struct t_config_option *config_history_max_commands; extern struct t_config_option *config_history_max_visited_buffers; extern struct t_config_option *config_history_display_default; +extern struct t_config_option *config_network_connection_timeout; extern struct t_config_option *config_network_gnutls_ca_file; extern struct t_config_option *config_network_gnutls_handshake_timeout; diff --git a/src/core/wee-hook.c b/src/core/wee-hook.c index 9ad507526..caedf6068 100644 --- a/src/core/wee-hook.c +++ b/src/core/wee-hook.c @@ -1763,6 +1763,7 @@ hook_connect (struct t_weechat_plugin *plugin, const char *proxy, new_hook_connect->child_read = -1; new_hook_connect->child_write = -1; new_hook_connect->child_pid = 0; + new_hook_connect->hook_child_timer = NULL; new_hook_connect->hook_fd = NULL; new_hook_connect->handshake_hook_fd = NULL; new_hook_connect->handshake_hook_timer = NULL; @@ -3128,6 +3129,8 @@ unhook (struct t_hook *hook) #endif if (HOOK_CONNECT(hook, local_hostname)) free (HOOK_CONNECT(hook, local_hostname)); + if (HOOK_CONNECT(hook, hook_child_timer)) + unhook (HOOK_CONNECT(hook, hook_child_timer)); if (HOOK_CONNECT(hook, hook_fd)) unhook (HOOK_CONNECT(hook, hook_fd)); if (HOOK_CONNECT(hook, handshake_hook_fd)) @@ -3471,6 +3474,8 @@ hook_add_to_infolist_type (struct t_infolist *infolist, int type, return 0; if (!infolist_new_var_integer (ptr_item, "child_pid", HOOK_CONNECT(ptr_hook, child_pid))) return 0; + if (!infolist_new_var_pointer (ptr_item, "hook_child_timer", HOOK_CONNECT(ptr_hook, hook_child_timer))) + return 0; if (!infolist_new_var_pointer (ptr_item, "hook_fd", HOOK_CONNECT(ptr_hook, hook_fd))) return 0; if (!infolist_new_var_pointer (ptr_item, "handshake_hook_fd", HOOK_CONNECT(ptr_hook, handshake_hook_fd))) @@ -3870,6 +3875,7 @@ hook_print_log () log_printf (" child_read. . . . . . : %d", HOOK_CONNECT(ptr_hook, child_read)); log_printf (" child_write . . . . . : %d", HOOK_CONNECT(ptr_hook, child_write)); log_printf (" child_pid . . . . . . : %d", HOOK_CONNECT(ptr_hook, child_pid)); + log_printf (" hook_child_timer. . . : 0x%lx", HOOK_CONNECT(ptr_hook, hook_child_timer)); log_printf (" hook_fd . . . . . . . : 0x%lx", HOOK_CONNECT(ptr_hook, hook_fd)); log_printf (" handshake_hook_fd . . : 0x%lx", HOOK_CONNECT(ptr_hook, handshake_hook_fd)); log_printf (" handshake_hook_timer. : 0x%lx", HOOK_CONNECT(ptr_hook, handshake_hook_timer)); diff --git a/src/core/wee-hook.h b/src/core/wee-hook.h index 2c8d1200e..16edb5b14 100644 --- a/src/core/wee-hook.h +++ b/src/core/wee-hook.h @@ -243,6 +243,7 @@ struct t_hook_connect int child_read; /* to read data in pipe from child */ int child_write; /* to write data in pipe for child */ pid_t child_pid; /* pid of child process (connecting) */ + struct t_hook *hook_child_timer; /* timer for child process timeout */ struct t_hook *hook_fd; /* pointer to fd hook */ struct t_hook *handshake_hook_fd; /* fd hook for handshake */ struct t_hook *handshake_hook_timer; /* timer for handshake timeout */ diff --git a/src/core/wee-network.c b/src/core/wee-network.c index 7952bf07f..ebc4c7597 100644 --- a/src/core/wee-network.c +++ b/src/core/wee-network.c @@ -767,6 +767,31 @@ network_connect_child (struct t_hook *hook_connect) } /* + * network_connect_child_timer_cb: timer for timeout of child process + */ + +int +network_connect_child_timer_cb (void *arg_hook_connect, int remaining_calls) +{ + struct t_hook *hook_connect; + + /* make C compiler happy */ + (void) remaining_calls; + + hook_connect = (struct t_hook *)arg_hook_connect; + + HOOK_CONNECT(hook_connect, hook_child_timer) = NULL; + + (void) (HOOK_CONNECT(hook_connect, callback)) + (hook_connect->callback_data, + WEECHAT_HOOK_CONNECT_TIMEOUT, + 0, NULL, NULL); + unhook (hook_connect); + + return WEECHAT_RC_OK; +} + +/* * network_connect_gnutls_handshake_fd_cb: callback for gnutls handshake * (used to not block WeeChat if * handshake takes some time to finish) @@ -1098,6 +1123,11 @@ network_connect_with_fork (struct t_hook *hook_connect) HOOK_CONNECT(hook_connect, child_pid) = pid; close (HOOK_CONNECT(hook_connect, child_write)); HOOK_CONNECT(hook_connect, child_write) = -1; + HOOK_CONNECT(hook_connect, hook_child_timer) = hook_timer (hook_connect->plugin, + CONFIG_INTEGER(config_network_connection_timeout) * 1000, + 0, 1, + &network_connect_child_timer_cb, + hook_connect); HOOK_CONNECT(hook_connect, hook_fd) = hook_fd (hook_connect->plugin, HOOK_CONNECT(hook_connect, child_read), 1, 0, 0, diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index ac523fe8a..19aca324d 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -3022,6 +3022,20 @@ irc_server_connect_cb (void *data, int status, int gnutls_rc, irc_server_close_connection (server); irc_server_reconnect_schedule (server); break; + case WEECHAT_HOOK_CONNECT_TIMEOUT: + weechat_printf (server->buffer, + _("%s%s: timeout"), + weechat_prefix ("error"), IRC_PLUGIN_NAME); + if (error && error[0]) + { + weechat_printf (server->buffer, + _("%s%s: error: %s"), + weechat_prefix ("error"), IRC_PLUGIN_NAME, + error); + } + irc_server_close_connection (server); + irc_server_reconnect_schedule (server); + break; } return WEECHAT_RC_OK; diff --git a/src/plugins/scripts/guile/weechat-guile-api.c b/src/plugins/scripts/guile/weechat-guile-api.c index 8260b4f39..80e319164 100644 --- a/src/plugins/scripts/guile/weechat-guile-api.c +++ b/src/plugins/scripts/guile/weechat-guile-api.c @@ -5446,6 +5446,7 @@ weechat_guile_api_module_init (void *data) scm_c_define ("weechat:WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR", scm_from_int (WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR)); scm_c_define ("weechat:WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR", scm_from_int (WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR)); scm_c_define ("weechat:WEECHAT_HOOK_CONNECT_MEMORY_ERROR", scm_from_int (WEECHAT_HOOK_CONNECT_MEMORY_ERROR)); + scm_c_define ("weechat:WEECHAT_HOOK_CONNECT_TIMEOUT", scm_from_int (WEECHAT_HOOK_CONNECT_TIMEOUT)); scm_c_define ("weechat:WEECHAT_HOOK_SIGNAL_STRING", scm_from_locale_string (WEECHAT_HOOK_SIGNAL_STRING)); scm_c_define ("weechat:WEECHAT_HOOK_SIGNAL_INT", scm_from_locale_string (WEECHAT_HOOK_SIGNAL_INT)); @@ -5486,6 +5487,7 @@ weechat_guile_api_module_init (void *data) "weechat:WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR", "weechat:WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR", "weechat:WEECHAT_HOOK_CONNECT_MEMORY_ERROR", + "weechat:WEECHAT_HOOK_CONNECT_TIMEOUT", "weechat:WEECHAT_HOOK_SIGNAL_STRING", "weechat:WEECHAT_HOOK_SIGNAL_INT", "weechat:WEECHAT_HOOK_SIGNAL_POINTER", diff --git a/src/plugins/scripts/lua/weechat-lua-api.c b/src/plugins/scripts/lua/weechat-lua-api.c index 908c218a7..29e7a794a 100644 --- a/src/plugins/scripts/lua/weechat-lua-api.c +++ b/src/plugins/scripts/lua/weechat-lua-api.c @@ -6131,6 +6131,16 @@ weechat_lua_api_constant_weechat_hook_connect_memory_error (lua_State *L) } static int +weechat_lua_api_constant_weechat_hook_connect_timeout (lua_State *L) +{ + /* make C compiler happy */ + (void) L; + + lua_pushnumber (lua_current_interpreter, WEECHAT_HOOK_CONNECT_TIMEOUT); + return 1; +} + +static int weechat_lua_api_constant_weechat_hook_signal_string (lua_State *L) { /* make C compiler happy */ @@ -6389,6 +6399,7 @@ const struct luaL_reg weechat_lua_api_funcs[] = { { "WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR", &weechat_lua_api_constant_weechat_hook_connect_gnutls_init_error }, { "WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR", &weechat_lua_api_constant_weechat_hook_connect_gnutls_handshake_error }, { "WEECHAT_HOOK_CONNECT_MEMORY_ERROR", &weechat_lua_api_constant_weechat_hook_connect_memory_error }, + { "WEECHAT_HOOK_CONNECT_TIMEOUT", &weechat_lua_api_constant_weechat_hook_connect_timeout }, { "WEECHAT_HOOK_SIGNAL_STRING", &weechat_lua_api_constant_weechat_hook_signal_string }, { "WEECHAT_HOOK_SIGNAL_INT", &weechat_lua_api_constant_weechat_hook_signal_int }, diff --git a/src/plugins/scripts/perl/weechat-perl-api.c b/src/plugins/scripts/perl/weechat-perl-api.c index e9fdff04b..9cc6d37bd 100644 --- a/src/plugins/scripts/perl/weechat-perl-api.c +++ b/src/plugins/scripts/perl/weechat-perl-api.c @@ -5743,6 +5743,7 @@ weechat_perl_api_init (pTHX) newCONSTSUB (stash, "weechat::WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR", newSViv (WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR)); newCONSTSUB (stash, "weechat::WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR", newSViv (WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR)); newCONSTSUB (stash, "weechat::WEECHAT_HOOK_CONNECT_MEMORY_ERROR", newSViv (WEECHAT_HOOK_CONNECT_MEMORY_ERROR)); + newCONSTSUB (stash, "weechat::WEECHAT_HOOK_CONNECT_TIMEOUT", newSViv (WEECHAT_HOOK_CONNECT_TIMEOUT)); newCONSTSUB (stash, "weechat::WEECHAT_HOOK_SIGNAL_STRING", newSVpv (WEECHAT_HOOK_SIGNAL_STRING, PL_na)); newCONSTSUB (stash, "weechat::WEECHAT_HOOK_SIGNAL_INT", newSVpv (WEECHAT_HOOK_SIGNAL_INT, PL_na)); diff --git a/src/plugins/scripts/python/weechat-python.c b/src/plugins/scripts/python/weechat-python.c index 3421c9308..9ab9ba455 100644 --- a/src/plugins/scripts/python/weechat-python.c +++ b/src/plugins/scripts/python/weechat-python.c @@ -546,6 +546,7 @@ void weechat_python_init_module_weechat () PyDict_SetItemString(weechat_dict, "WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR", PyLong_FromLong((long) WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR)); PyDict_SetItemString(weechat_dict, "WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR", PyLong_FromLong((long) WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR)); PyDict_SetItemString(weechat_dict, "WEECHAT_HOOK_CONNECT_MEMORY_ERROR", PyLong_FromLong((long) WEECHAT_HOOK_CONNECT_MEMORY_ERROR)); + PyDict_SetItemString(weechat_dict, "WEECHAT_HOOK_CONNECT_TIMEOUT", PyLong_FromLong((long) WEECHAT_HOOK_CONNECT_TIMEOUT)); PyDict_SetItemString(weechat_dict, "WEECHAT_HOOK_SIGNAL_STRING", PyUnicode_FromString(WEECHAT_HOOK_SIGNAL_STRING)); PyDict_SetItemString(weechat_dict, "WEECHAT_HOOK_SIGNAL_INT", PyUnicode_FromString(WEECHAT_HOOK_SIGNAL_INT)); diff --git a/src/plugins/scripts/ruby/weechat-ruby-api.c b/src/plugins/scripts/ruby/weechat-ruby-api.c index 5b46e91a4..31d6de065 100644 --- a/src/plugins/scripts/ruby/weechat-ruby-api.c +++ b/src/plugins/scripts/ruby/weechat-ruby-api.c @@ -6600,6 +6600,7 @@ weechat_ruby_api_init (VALUE ruby_mWeechat) rb_define_const(ruby_mWeechat, "WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR", INT2NUM(WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR)); rb_define_const(ruby_mWeechat, "WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR", INT2NUM(WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR)); rb_define_const(ruby_mWeechat, "WEECHAT_HOOK_CONNECT_MEMORY_ERROR", INT2NUM(WEECHAT_HOOK_CONNECT_MEMORY_ERROR)); + rb_define_const(ruby_mWeechat, "WEECHAT_HOOK_CONNECT_TIMEOUT", INT2NUM(WEECHAT_HOOK_CONNECT_TIMEOUT)); rb_define_const(ruby_mWeechat, "WEECHAT_HOOK_SIGNAL_STRING", rb_str_new2(WEECHAT_HOOK_SIGNAL_STRING)); rb_define_const(ruby_mWeechat, "WEECHAT_HOOK_SIGNAL_INT", rb_str_new2(WEECHAT_HOOK_SIGNAL_INT)); diff --git a/src/plugins/scripts/tcl/weechat-tcl-api.c b/src/plugins/scripts/tcl/weechat-tcl-api.c index 71d44b478..472117b18 100644 --- a/src/plugins/scripts/tcl/weechat-tcl-api.c +++ b/src/plugins/scripts/tcl/weechat-tcl-api.c @@ -6331,6 +6331,8 @@ void weechat_tcl_api_init (Tcl_Interp *interp) Tcl_SetVar (interp, "weechat::WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR", Tcl_GetStringFromObj (objp, &i), 0); Tcl_SetIntObj (objp, WEECHAT_HOOK_CONNECT_MEMORY_ERROR); Tcl_SetVar (interp, "weechat::WEECHAT_HOOK_CONNECT_MEMORY_ERROR", Tcl_GetStringFromObj (objp, &i), 0); + Tcl_SetIntObj (objp, WEECHAT_HOOK_CONNECT_TIMEOUT); + Tcl_SetVar (interp, "weechat::WEECHAT_HOOK_CONNECT_TIMEOUT", Tcl_GetStringFromObj (objp, &i), 0); Tcl_SetStringObj (objp, WEECHAT_HOOK_SIGNAL_STRING, -1); Tcl_SetVar (interp, "weechat::WEECHAT_HOOK_SIGNAL_STRING", Tcl_GetStringFromObj (objp, &i), 0); diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h index 2c5535e2f..35ac07f63 100644 --- a/src/plugins/weechat-plugin.h +++ b/src/plugins/weechat-plugin.h @@ -46,7 +46,7 @@ struct timeval; */ /* API version (used to check that plugin has same API and can be loaded) */ -#define WEECHAT_PLUGIN_API_VERSION "20120122-01" +#define WEECHAT_PLUGIN_API_VERSION "20120323-01" /* macros for defining plugin infos */ #define WEECHAT_PLUGIN_NAME(__name) \ @@ -137,6 +137,7 @@ struct timeval; #define WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR 6 #define WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR 7 #define WEECHAT_HOOK_CONNECT_MEMORY_ERROR 8 +#define WEECHAT_HOOK_CONNECT_TIMEOUT 9 /* action for gnutls callback: verify or set certificate */ #define WEECHAT_HOOK_CONNECT_GNUTLS_CB_VERIFY_CERT 0 |