diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2011-10-09 10:33:05 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2011-10-09 10:33:05 +0200 |
commit | 2af9c4ba92c13f44ead7a488b6fe76416113d7bb (patch) | |
tree | 9a9e38257f816eb2d22fbd7b6302e707b52f99c4 | |
parent | 298fde23fe9a19ee6db8a89daabf66d5bc661728 (diff) | |
download | weechat-2af9c4ba92c13f44ead7a488b6fe76416113d7bb.zip |
core: display timeout for hook_process command only if debug for core is enabled (task #11401)
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/core/wee-hook.c | 11 |
2 files changed, 10 insertions, 5 deletions
@@ -1,12 +1,14 @@ WeeChat ChangeLog ================= Sébastien Helleu <flashcode@flashtux.org> -v0.3.6-rc1, 2011-10-07 +v0.3.6-rc1, 2011-10-09 Version 0.3.6 (under dev!) -------------------------- +* core: display timeout for hook_process command only if debug for core is + enabled (task #11401) * core: bufferize lines displayed before core buffer is created, to display them in buffer when it is created * core: fix display of background color in chat area after line feed diff --git a/src/core/wee-hook.c b/src/core/wee-hook.c index 1fad570b3..a2e579d5e 100644 --- a/src/core/wee-hook.c +++ b/src/core/wee-hook.c @@ -1532,10 +1532,13 @@ hook_process_timer_cb (void *arg_hook_process, int remaining_calls) if (remaining_calls == 0) { hook_process_send_buffers (hook_process, WEECHAT_HOOK_PROCESS_ERROR); - gui_chat_printf (NULL, - _("End of command '%s', timeout reached (%.1fs)"), - HOOK_PROCESS(hook_process, command), - ((float)HOOK_PROCESS(hook_process, timeout)) / 1000); + if (weechat_debug_core >= 1) + { + gui_chat_printf (NULL, + _("End of command '%s', timeout reached (%.1fs)"), + HOOK_PROCESS(hook_process, command), + ((float)HOOK_PROCESS(hook_process, timeout)) / 1000); + } kill (HOOK_PROCESS(hook_process, child_pid), SIGKILL); usleep (1000); unhook (hook_process); |