static int do_pause_or_unpause(struct mansession *s, struct message *m, int action) { struct ast_channel *c = NULL; char *name = astman_get_header(m, "Channel"); if (IS_NULL_STRING(name)) { astman_send_error(s, m, "No channel specified"); return -1; } c = ast_get_channel_by_name_locked(name); if (!c) { astman_send_error(s, m, "No such channel"); return -1; } if (action == MONITOR_ACTION_PAUSE) ast_monitor_pause(c); else ast_monitor_unpause(c); ast_channel_unlock(c); astman_send_ack(s, m, "Paused monitoring of the channel"); return 0; }
/*! \brief Wrapper for ast_monitor_unpause */ static int unpause_monitor_exec(struct ast_channel *chan, const char *data) { return ast_monitor_unpause(chan); }
int unpause_monitor_exec(struct ast_channel *chan, void *data) { return ast_monitor_unpause(chan); }