diff options
author | nicm <nicm> | 2016-10-16 19:36:37 +0000 |
---|---|---|
committer | nicm <nicm> | 2016-10-16 19:36:37 +0000 |
commit | 3f35b5299fb2c08637aa12757185e5b82eeb3fc1 (patch) | |
tree | 5323b2851735c5b1052a4c2bae303f532bee191c /notify.c | |
parent | 026ad08b56b4577beab6bad06b8a7a21602bca11 (diff) | |
download | rtmux-3f35b5299fb2c08637aa12757185e5b82eeb3fc1.tar.gz rtmux-3f35b5299fb2c08637aa12757185e5b82eeb3fc1.tar.bz2 rtmux-3f35b5299fb2c08637aa12757185e5b82eeb3fc1.zip |
Provide a way for hooks to tag formats onto the commands they fire so
that the user can get at additional information - now used for the
"hook" format, more to come.
Diffstat (limited to 'notify.c')
-rw-r--r-- | notify.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -59,7 +59,7 @@ notify_hook(struct cmdq_item *item, struct notify_entry *ne) const char *name; struct cmd_find_state fs; struct hook *hook; - struct cmdq_item *new_item, *loop; + struct cmdq_item *new_item; name = notify_hooks[ne->type]; if (name == NULL) @@ -83,10 +83,7 @@ notify_hook(struct cmdq_item *item, struct notify_entry *ne) log_debug("notify hook %s", name); new_item = cmdq_get_command(hook->cmdlist, &fs, NULL, CMDQ_NOHOOKS); - - for (loop = new_item; loop != NULL; loop = loop->next) - loop->hook = xstrdup(name); - + cmdq_format(new_item, "hook", "%s", name); cmdq_insert_after(item, new_item); } |