From 5385a9bb347ae703fdc44eb59c71d70e61fbf95e Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Fri, 13 Jul 2012 06:27:41 +0000 Subject: Add a queue of notifys and a way to turn them off and on (we do not want notifys to happen during some commands). Based on code from George Nachman. --- cmd-list.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmd-list.c') diff --git a/cmd-list.c b/cmd-list.c index 80d1ade3..2cf66a80 100644 --- a/cmd-list.c +++ b/cmd-list.c @@ -91,6 +91,8 @@ cmd_list_exec(struct cmd_list *cmdlist, struct cmd_ctx *ctx) if (c != NULL && c->session != NULL) guards = c->flags & CLIENT_CONTROL; + notify_disable(); + retval = 0; TAILQ_FOREACH(cmd, &cmdlist->list, qentry) { if (guards) @@ -128,6 +130,8 @@ cmd_list_exec(struct cmd_list *cmdlist, struct cmd_ctx *ctx) break; } } + + notify_enable(); return (retval); } -- cgit