1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 22:06:38 +02:00

relay: fix number of bytes sent/received on 32-bit systems

This commit is contained in:
Sébastien Helleu
2014-08-02 16:17:30 +02:00
parent e29f01b4fb
commit 6295adad6d
16 changed files with 39 additions and 38 deletions
+1
View File
@@ -169,6 +169,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
* python: fix read of return value for callbacks returning an integer
in Python 2.x (closes #125)
* python: fix interpreter used after unload of a script
* relay: fix number of bytes sent/received on 32-bit systems
* relay: fix crash when closing relay buffers (closes #57, closes #78)
* relay: check pointers received in hdata command to prevent crashes with bad
pointers (WeeChat protocol)
+2 -2
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2014-07-25 20:37+0200\n"
"POT-Creation-Date: 2014-08-02 16:12+0200\n"
"PO-Revision-Date: 2014-07-25 07:49+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -9058,7 +9058,7 @@ msgstr "Klienti pro přenos:"
#, fuzzy, c-format
msgid ""
" %s%s%s (%s%s%s), started on: %s, last activity: %s, bytes: %lu recv, %lu "
" %s%s%s (%s%s%s), started on: %s, last activity: %s, bytes: %llu recv, %llu "
"sent"
msgstr ""
" id: %d, %s%s%s (%s%s%s), spuštěn v: %s, poslední aktivita: %s, bytů: %lu "
+3 -3
View File
@@ -10140,11 +10140,11 @@ msgstr "Verbindungen zu Clients für Relay:"
#, c-format
msgid ""
" %s%s%s (%s%s%s), started on: %s, last activity: %s, bytes: %lu recv, %lu "
" %s%s%s (%s%s%s), started on: %s, last activity: %s, bytes: %llu recv, %llu "
"sent"
msgstr ""
" %s%s%s (%s%s%s), gestartet am: %s, letzte Aktivität: %s, Bytes: %lu "
"empfangen, %lu gesendet"
" %s%s%s (%s%s%s), gestartet am: %s, letzte Aktivität: %s, Bytes: %llu "
"empfangen, %llu gesendet"
#, c-format
msgid " %s%s%s (%s%s%s), started on: %s"
+3 -3
View File
@@ -9337,11 +9337,11 @@ msgstr "Clientes conectados para retransmitir:"
#, c-format
msgid ""
" %s%s%s (%s%s%s), started on: %s, last activity: %s, bytes: %lu recv, %lu "
" %s%s%s (%s%s%s), started on: %s, last activity: %s, bytes: %llu recv, %llu "
"sent"
msgstr ""
" %s%s%s (%s%s%s), iniciado en: %s, última actividad: %s, bytes: %lu "
"recibidos, %lu enviados"
" %s%s%s (%s%s%s), iniciado en: %s, última actividad: %s, bytes: %llu "
"recibidos, %llu enviados"
#, c-format
msgid " %s%s%s (%s%s%s), started on: %s"
+3 -3
View File
@@ -9914,11 +9914,11 @@ msgstr "Clients connectés pour le relai :"
#, c-format
msgid ""
" %s%s%s (%s%s%s), started on: %s, last activity: %s, bytes: %lu recv, %lu "
" %s%s%s (%s%s%s), started on: %s, last activity: %s, bytes: %llu recv, %llu "
"sent"
msgstr ""
" %s%s%s (%s%s%s), démarré le : %s, dernière activité : %s, octets : %lu "
"reçus, %lu envoyés"
" %s%s%s (%s%s%s), démarré le : %s, dernière activité : %s, octets : %llu "
"reçus, %llu envoyés"
#, c-format
msgid " %s%s%s (%s%s%s), started on: %s"
+2 -2
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2014-08-02 11:25+0200\n"
"POT-Creation-Date: 2014-08-02 16:12+0200\n"
"PO-Revision-Date: 2014-07-25 07:49+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -8453,7 +8453,7 @@ msgstr ""
#, c-format
msgid ""
" %s%s%s (%s%s%s), started on: %s, last activity: %s, bytes: %lu recv, %lu "
" %s%s%s (%s%s%s), started on: %s, last activity: %s, bytes: %llu recv, %llu "
"sent"
msgstr ""
+3 -3
View File
@@ -9494,11 +9494,11 @@ msgstr "Client connessi per il relay:"
#, c-format
msgid ""
" %s%s%s (%s%s%s), started on: %s, last activity: %s, bytes: %lu recv, %lu "
" %s%s%s (%s%s%s), started on: %s, last activity: %s, bytes: %llu recv, %llu "
"sent"
msgstr ""
" %s%s%s (%s%s%s), avviato il %s, attività recente: %s byte: %lu ricevuti, "
"%lu inviati"
" %s%s%s (%s%s%s), avviato il %s, attività recente: %s byte: %llu ricevuti, "
"%llu inviati"
#, c-format
msgid " %s%s%s (%s%s%s), started on: %s"
+2 -2
View File
@@ -9541,10 +9541,10 @@ msgstr "リレーする接続済みクライアント:"
#, c-format
msgid ""
" %s%s%s (%s%s%s), started on: %s, last activity: %s, bytes: %lu recv, %lu "
" %s%s%s (%s%s%s), started on: %s, last activity: %s, bytes: %llu recv, %llu "
"sent"
msgstr ""
" %s%s%s (%s%s%s)、開始日時: %s、最新の活動: %s、バイト数: %lu 受信、%lu 送信"
" %s%s%s (%s%s%s)、開始日時: %s、最新の活動: %s、バイト数: %llu 受信、%llu 送信"
#, c-format
msgid " %s%s%s (%s%s%s), started on: %s"
+3 -3
View File
@@ -9660,11 +9660,11 @@ msgstr "Klienci do przekazywania:"
#, c-format
msgid ""
" %s%s%s (%s%s%s), started on: %s, last activity: %s, bytes: %lu recv, %lu "
" %s%s%s (%s%s%s), started on: %s, last activity: %s, bytes: %llu recv, %llu "
"sent"
msgstr ""
" %s%s%s (%s%s%s), rozpoczęto: %s, ostatnia aktywność: %s, bajtów: %lu "
"odebrano, %lu wysłano"
" %s%s%s (%s%s%s), rozpoczęto: %s, ostatnia aktywność: %s, bajtów: %llu "
"odebrano, %llu wysłano"
#, c-format
msgid " %s%s%s (%s%s%s), started on: %s"
+2 -2
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2014-08-02 11:25+0200\n"
"POT-Creation-Date: 2014-08-02 16:12+0200\n"
"PO-Revision-Date: 2014-07-14 18:44+0200\n"
"Last-Translator: Sergio Durigan Junior <sergiosdj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -8716,7 +8716,7 @@ msgstr "Clientes para relay:"
#, fuzzy, c-format
msgid ""
" %s%s%s (%s%s%s), started on: %s, last activity: %s, bytes: %lu recv, %lu "
" %s%s%s (%s%s%s), started on: %s, last activity: %s, bytes: %llu recv, %llu "
"sent"
msgstr ""
" id: %d, %s%s%s (%s%s%s), iniciado em: %s, última atividade: %s, %lu bytes "
+2 -2
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2014-08-02 11:25+0200\n"
"POT-Creation-Date: 2014-08-02 16:12+0200\n"
"PO-Revision-Date: 2014-07-25 07:50+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -8481,7 +8481,7 @@ msgstr ""
#, c-format
msgid ""
" %s%s%s (%s%s%s), started on: %s, last activity: %s, bytes: %lu recv, %lu "
" %s%s%s (%s%s%s), started on: %s, last activity: %s, bytes: %llu recv, %llu "
"sent"
msgstr ""
+2 -2
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2014-08-02 11:25+0200\n"
"POT-Creation-Date: 2014-08-02 16:12+0200\n"
"PO-Revision-Date: 2014-07-25 07:50+0200\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -7600,7 +7600,7 @@ msgstr ""
#, c-format
msgid ""
" %s%s%s (%s%s%s), started on: %s, last activity: %s, bytes: %lu recv, %lu "
" %s%s%s (%s%s%s), started on: %s, last activity: %s, bytes: %llu recv, %llu "
"sent"
msgstr ""
+2 -2
View File
@@ -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: 2014-08-02 11:25+0200\n"
"POT-Creation-Date: 2014-08-02 16:12+0200\n"
"PO-Revision-Date: 2013-02-14 18:20+0100\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -7543,7 +7543,7 @@ msgstr ""
#, c-format
msgid ""
" %s%s%s (%s%s%s), started on: %s, last activity: %s, bytes: %lu recv, %lu "
" %s%s%s (%s%s%s), started on: %s, last activity: %s, bytes: %llu recv, %llu "
"sent"
msgstr ""
+6 -6
View File
@@ -1253,9 +1253,9 @@ relay_client_new_with_infolist (struct t_infolist *infolist)
new_client->hook_fd = NULL;
new_client->last_activity = weechat_infolist_time (infolist, "last_activity");
sscanf (weechat_infolist_string (infolist, "bytes_recv"),
"%lu", &(new_client->bytes_recv));
"%llu", &(new_client->bytes_recv));
sscanf (weechat_infolist_string (infolist, "bytes_sent"),
"%lu", &(new_client->bytes_sent));
"%llu", &(new_client->bytes_sent));
new_client->recv_data_type = weechat_infolist_integer (infolist, "recv_data_type");
new_client->send_data_type = weechat_infolist_integer (infolist, "send_data_type");
str = weechat_infolist_string (infolist, "partial_message");
@@ -1554,10 +1554,10 @@ relay_client_add_to_infolist (struct t_infolist *infolist,
return 0;
if (!weechat_infolist_new_var_time (ptr_item, "last_activity", client->last_activity))
return 0;
snprintf (value, sizeof (value), "%lu", client->bytes_recv);
snprintf (value, sizeof (value), "%llu", client->bytes_recv);
if (!weechat_infolist_new_var_string (ptr_item, "bytes_recv", value))
return 0;
snprintf (value, sizeof (value), "%lu", client->bytes_sent);
snprintf (value, sizeof (value), "%llu", client->bytes_sent);
if (!weechat_infolist_new_var_string (ptr_item, "bytes_sent", value))
return 0;
if (!weechat_infolist_new_var_integer (ptr_item, "recv_data_type", client->recv_data_type))
@@ -1622,8 +1622,8 @@ relay_client_print_log ()
weechat_log_printf (" end_time. . . . . . . : %ld", ptr_client->end_time);
weechat_log_printf (" hook_fd . . . . . . . : 0x%lx", ptr_client->hook_fd);
weechat_log_printf (" last_activity . . . . : %ld", ptr_client->last_activity);
weechat_log_printf (" bytes_recv. . . . . . : %lu", ptr_client->bytes_recv);
weechat_log_printf (" bytes_sent. . . . . . : %lu", ptr_client->bytes_sent);
weechat_log_printf (" bytes_recv. . . . . . : %llu", ptr_client->bytes_recv);
weechat_log_printf (" bytes_sent. . . . . . : %llu", ptr_client->bytes_sent);
weechat_log_printf (" recv_data_type. . . . : %d (%s)",
ptr_client->recv_data_type,
relay_client_data_type_string[ptr_client->recv_data_type]);
+2 -2
View File
@@ -93,8 +93,8 @@ struct t_relay_client
time_t end_time; /* time of client disconnection */
struct t_hook *hook_fd; /* hook for socket or child pipe */
time_t last_activity; /* time of last byte received/sent */
unsigned long bytes_recv; /* bytes received from client */
unsigned long bytes_sent; /* bytes sent to client */
unsigned long long bytes_recv; /* bytes received from client */
unsigned long long bytes_sent; /* bytes sent to client */
enum t_relay_client_data_type recv_data_type; /* type recv from client */
enum t_relay_client_data_type send_data_type; /* type sent to client */
char *partial_message; /* partial text message received */
+1 -1
View File
@@ -82,7 +82,7 @@ relay_command_client_list (int full)
{
weechat_printf (NULL,
_(" %s%s%s (%s%s%s), started on: %s, last activity: %s, "
"bytes: %lu recv, %lu sent"),
"bytes: %llu recv, %llu sent"),
RELAY_COLOR_CHAT_CLIENT,
ptr_client->desc,
RELAY_COLOR_CHAT,