[asterisk-commits] gtjoseph: branch 11 r422440 - in /branches/11: ./ main/manager.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Aug 30 12:22:07 CDT 2014
Author: gtjoseph
Date: Sat Aug 30 12:22:00 2014
New Revision: 422440
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=422440
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
Modified:
branches/11/ (props changed)
branches/11/main/manager.c
Propchange: branches/11/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: branches/11/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/main/manager.c?view=diff&rev=422440&r1=422439&r2=422440
==============================================================================
--- branches/11/main/manager.c (original)
+++ branches/11/main/manager.c Sat Aug 30 12:22:00 2014
@@ -1199,6 +1199,8 @@
static void free_channelvars(void);
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);
/*!
* \internal
@@ -3205,8 +3207,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 asterisk-commits
mailing list