[svn-commits] gtjoseph: branch 12 r422441 - in /branches/12: ./ main/manager.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Sat Aug 30 12:22:59 CDT 2014
Author: gtjoseph
Date: Sat Aug 30 12:22:55 2014
New Revision: 422441
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=422441
Log:
manager: Make WaitEvent action respect eventfilters
A WaitEvent issued via an http session isn't respecting eventfilters defined
for the user. I just added a match_filter to the predicate that controls
astman_append.
Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3958/
........
Merged revisions 422439 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 422440 from http://svn.asterisk.org/svn/asterisk/branches/11
Modified:
branches/12/ (props changed)
branches/12/main/manager.c
Propchange: branches/12/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.
Modified: branches/12/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/main/manager.c?view=diff&rev=422441&r1=422440&r2=422441
==============================================================================
--- branches/12/main/manager.c (original)
+++ branches/12/main/manager.c Sat Aug 30 12:22:55 2014
@@ -1308,6 +1308,8 @@
static AO2_GLOBAL_OBJ_STATIC(event_docs);
static enum add_filter_result manager_add_filter(const char *filter_pattern, struct ao2_container *whitefilters, struct ao2_container *blackfilters);
+
+static int match_filter(struct mansession *s, char *eventdata);
/*!
* @{ \brief Define AMI message types.
@@ -3503,8 +3505,9 @@
struct eventqent *eqe = s->session->last_ev;
astman_send_response(s, m, "Success", "Waiting for Event completed.");
while ((eqe = advance_event(eqe))) {
- if (((s->session->readperm & eqe->category) == eqe->category) &&
- ((s->session->send_events & eqe->category) == eqe->category)) {
+ if (((s->session->readperm & eqe->category) == eqe->category)
+ && ((s->session->send_events & eqe->category) == eqe->category)
+ && match_filter(s, eqe->eventdata)) {
astman_append(s, "%s", eqe->eventdata);
}
s->session->last_ev = eqe;
More information about the svn-commits
mailing list