diff options
author | nicm <nicm> | 2016-04-29 14:05:24 +0000 |
---|---|---|
committer | nicm <nicm> | 2016-04-29 14:05:24 +0000 |
commit | 0d84fdd95303a6ed4dcd761425e35f3731b86725 (patch) | |
tree | 3c1c65d16677c6b7aa579c8bf6500331ec08db47 /format.c | |
parent | c5443da2d3bd5ef2464cc59941e55890aaff3fb0 (diff) | |
download | rtmux-0d84fdd95303a6ed4dcd761425e35f3731b86725.tar.gz rtmux-0d84fdd95303a6ed4dcd761425e35f3731b86725.tar.bz2 rtmux-0d84fdd95303a6ed4dcd761425e35f3731b86725.zip |
Final parts of command hooks, add before- and after- hooks to each command.
Diffstat (limited to 'format.c')
-rw-r--r-- | format.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -468,6 +468,7 @@ struct format_tree * format_create(struct cmd_q *cmdq, int flags) { struct format_tree *ft; + struct cmd *cmd; if (!event_initialized(&format_job_event)) { evtimer_set(&format_job_event, format_job_timer, NULL); @@ -486,6 +487,10 @@ format_create(struct cmd_q *cmdq, int flags) if (cmdq != NULL && cmdq->cmd != NULL) format_add(ft, "command_name", "%s", cmdq->cmd->entry->name); + if (cmdq != NULL && cmdq->parent != NULL) { + cmd = cmdq->parent->cmd; + format_add(ft, "command_hooked", "%s", cmd->entry->name); + } return (ft); } |