[svn-commits] gtjoseph: branch 1.8 r422439 - /branches/1.8/main/manager.c

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


Author: gtjoseph
Date: Sat Aug 30 12:19:07 2014
New Revision: 422439

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

Modified:
    branches/1.8/main/manager.c

Modified: branches/1.8/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/manager.c?view=diff&rev=422439&r1=422438&r2=422439
==============================================================================
--- branches/1.8/main/manager.c (original)
+++ branches/1.8/main/manager.c Sat Aug 30 12:19:07 2014
@@ -1061,6 +1061,8 @@
 static AST_RWLIST_HEAD_STATIC(manager_hooks, manager_custom_hook);
 
 static void free_channelvars(void);
+
+static int match_filter(struct mansession *s, char *eventdata);
 
 /*!
  * \internal
@@ -3019,8 +3021,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