From 2af9c4ba92c13f44ead7a488b6fe76416113d7bb Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sun, 9 Oct 2011 10:33:05 +0200 Subject: [PATCH] core: display timeout for hook_process command only if debug for core is enabled (task #11401) --- ChangeLog | 4 +++- src/core/wee-hook.c | 11 +++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index a093b148f..9d1a491ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,14 @@ WeeChat ChangeLog ================= Sébastien Helleu -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);