[svn-commits] gtjoseph: branch 13 r422442 - in /branches/13: ./ main/manager.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat Aug 30 12:24:06 CDT 2014


Author: gtjoseph
Date: Sat Aug 30 12:24:02 2014
New Revision: 422442

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=422442
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
........

Merged revisions 422441 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    branches/13/   (props changed)
    branches/13/main/manager.c

Propchange: branches/13/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: branches/13/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/main/manager.c?view=diff&rev=422442&r1=422441&r2=422442
==============================================================================
--- branches/13/main/manager.c (original)
+++ branches/13/main/manager.c Sat Aug 30 12:24:02 2014
@@ -1364,6 +1364,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.
@@ -3585,8 +3587,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