1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-07 16:05:42 +02:00

Add detection of system clock skew, reinitialize all timers when this happens

This commit is contained in:
Sebastien Helleu
2008-11-03 17:04:49 +01:00
parent fcd08f8ee4
commit 12bc7f13e1
11 changed files with 176 additions and 63 deletions
+5 -1
View File
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2008-11-02 18:48+0100\n"
"POT-Creation-Date: 2008-11-03 15:56+0100\n"
"PO-Revision-Date: 2008-09-17 16:19+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1750,6 +1750,10 @@ msgstr " . hodnoty: mezi %d a %d\n"
msgid " . description: %s\n"
msgstr " . popis: %s\n"
#, c-format
msgid "System clock skew detected (-%ld seconds), reinitializing all timers"
msgstr ""
#, fuzzy, c-format
msgid "%sError: too much calls to command \"%s\" (looping)"
msgstr "%s nekorektní hodnota pro volbu \"%s\"\n"
+5 -1
View File
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2008-11-02 18:48+0100\n"
"POT-Creation-Date: 2008-11-03 15:56+0100\n"
"PO-Revision-Date: 2007-09-06 12:44+0200\n"
"Last-Translator: Thomas Schuetz <i18n@internet-villa.de>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1767,6 +1767,10 @@ msgstr " . Werte: zwischen %d und %d\n"
msgid " . description: %s\n"
msgstr " . Beschreibung: %s\n"
#, c-format
msgid "System clock skew detected (-%ld seconds), reinitializing all timers"
msgstr ""
#, fuzzy, c-format
msgid "%sError: too much calls to command \"%s\" (looping)"
msgstr "%s ungültiger Wert für die Option \"%s\"\n"
+7 -3
View File
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2008-11-02 18:48+0100\n"
"POT-Creation-Date: 2008-11-03 15:56+0100\n"
"PO-Revision-Date: 2007-09-19 12:09+0200\n"
"Last-Translator: Roberto González Cardenete <robert.glez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1257,8 +1257,8 @@ msgstr "la cadena mostrada tras la finalización de los nombres de usuario"
#, fuzzy
msgid "use a marker (line or char) on buffers to show first unread line"
msgstr ""
"usar un marcador en los servidores/canales para mostrar la primera línea "
"sin leer"
"usar un marcador en los servidores/canales para mostrar la primera línea sin "
"leer"
#, fuzzy
msgid "save configuration file on exit"
@@ -1754,6 +1754,10 @@ msgstr " . valores: entre %d y %d\n"
msgid " . description: %s\n"
msgstr " . descripción: %s\n"
#, c-format
msgid "System clock skew detected (-%ld seconds), reinitializing all timers"
msgstr ""
#, fuzzy, c-format
msgid "%sError: too much calls to command \"%s\" (looping)"
msgstr "%s valor incorrecto para la opción \"%s\"\n"
+8 -2
View File
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2008-11-02 18:48+0100\n"
"PO-Revision-Date: 2008-11-02 18:49+0100\n"
"POT-Creation-Date: 2008-11-03 15:56+0100\n"
"PO-Revision-Date: 2008-11-03 15:57+0100\n"
"Last-Translator: FlashCode <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"MIME-Version: 1.0\n"
@@ -1777,6 +1777,12 @@ msgstr " . valeurs: couleur (dépend de l'interface utilisée)\n"
msgid " . description: %s\n"
msgstr " . description: %s\n"
#, c-format
msgid "System clock skew detected (-%ld seconds), reinitializing all timers"
msgstr ""
"Décalage de l'horloge système détecté (-%ld secondes), réinitialisation de "
"tous les minuteurs"
#, c-format
msgid "%sError: too much calls to command \"%s\" (looping)"
msgstr "%sErreur: trop d'appels à la commande \"%s\" (boucle)"
+5 -1
View File
@@ -12,7 +12,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2008-11-02 18:48+0100\n"
"POT-Creation-Date: 2008-11-03 15:56+0100\n"
"PO-Revision-Date: 2007-10-10 18:07+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1778,6 +1778,10 @@ msgstr " . értékek: %d és %d között\n"
msgid " . description: %s\n"
msgstr " . leírás : %s\n"
#, c-format
msgid "System clock skew detected (-%ld seconds), reinitializing all timers"
msgstr ""
#, fuzzy, c-format
msgid "%sError: too much calls to command \"%s\" (looping)"
msgstr "%s helytelen érték a \"%s\" paraméternek\n"
+5 -1
View File
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2008-11-02 18:48+0100\n"
"POT-Creation-Date: 2008-11-03 15:56+0100\n"
"PO-Revision-Date: 2007-09-06 12:44+0200\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1780,6 +1780,10 @@ msgstr " . значения: от %d до %d\n"
msgid " . description: %s\n"
msgstr " . описание: %s\n"
#, c-format
msgid "System clock skew detected (-%ld seconds), reinitializing all timers"
msgstr ""
#, fuzzy, c-format
msgid "%sError: too much calls to command \"%s\" (looping)"
msgstr "%s некорректное значение параметра \"%s\"\n"
+5 -1
View File
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2008-11-02 18:48+0100\n"
"POT-Creation-Date: 2008-11-03 15:56+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"
@@ -1481,6 +1481,10 @@ msgstr ""
msgid " . description: %s\n"
msgstr ""
#, c-format
msgid "System clock skew detected (-%ld seconds), reinitializing all timers"
msgstr ""
#, c-format
msgid "%sError: too much calls to command \"%s\" (looping)"
msgstr ""
+120 -46
View File
File diff suppressed because it is too large Load Diff
+3 -1
View File
@@ -106,6 +106,8 @@ struct t_hook_timer
{
t_hook_callback_timer *callback; /* timer callback */
long interval; /* timer interval (milliseconds) */
int align_second; /* alignment on a second */
/* for ex.: 60 = each min. at 0 sec */
int remaining_calls; /* calls remaining (0 = unlimited) */
struct timeval last_exec; /* last time hook was executed */
struct timeval next_exec; /* next scheduled execution */
@@ -242,7 +244,7 @@ extern struct t_hook *hook_timer (struct t_weechat_plugin *plugin,
int max_calls,
t_hook_callback_timer *callback,
void *callback_data);
extern int hook_timer_time_to_next (struct timeval *tv_timeout);
extern void hook_timer_time_to_next (struct timeval *tv_timeout);
extern void hook_timer_exec ();
extern struct t_hook *hook_fd (struct t_weechat_plugin *plugin, int fd,
int flag_read, int flag_write,
+3 -6
View File
@@ -294,12 +294,9 @@ gui_main_loop ()
FD_ZERO (&write_fds);
FD_ZERO (&except_fds);
max_fd = hook_fd_set (&read_fds, &write_fds, &except_fds);
if (hook_timer_time_to_next (&tv_timeout))
ready = select (max_fd + 1, &read_fds, &write_fds, &except_fds,
&tv_timeout);
else
ready = select (max_fd + 1, &read_fds, &write_fds, &except_fds,
NULL);
hook_timer_time_to_next (&tv_timeout);
ready = select (max_fd + 1, &read_fds, &write_fds, &except_fds,
&tv_timeout);
if (ready > 0)
{
hook_fd_exec (&read_fds, &write_fds, &except_fds);
+10
View File
@@ -1117,6 +1117,11 @@ irc_server_outqueue_send (struct t_irc_server *server)
if (server->outqueue)
{
time_now = time (NULL);
/* detect if system clock has been changed (now lower than before) */
if (server->last_user_message > time_now)
server->last_user_message = time_now;
if (time_now >= server->last_user_message +
weechat_config_integer (irc_config_network_anti_flood))
{
@@ -1347,6 +1352,11 @@ irc_server_send_one_msg (struct t_irc_server *server, const char *message)
/* anti-flood: look whether we should queue outgoing message or not */
time_now = time (NULL);
/* detect if system clock has been changed (now lower than before) */
if (server->last_user_message > time_now)
server->last_user_message = time_now;
queue = 0;
if ((server->queue_msg)
&& ((server->outqueue)