1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-10 03:33:12 +02:00

core: display timeout for hook_process command only if debug for core is enabled (task #11401)

This commit is contained in:
Sebastien Helleu
2011-10-09 10:33:05 +02:00
parent 298fde23fe
commit 2af9c4ba92
2 changed files with 10 additions and 5 deletions
+7 -4
View File
@@ -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);