[prev in list] [next in list] [prev in thread] [next in thread] 

List:       asterisk-commits
Subject:    [asterisk-commits] gtjoseph: branch 12 r422441 - in /branches/12: ./ main/manager.c
From:       SVN commits to the Asterisk project <asterisk-commits () lists ! digium ! com>
Date:       2014-08-30 17:22:59
Message-ID: mailman.18666.1409419340.1102.asterisk-commits () lists ! digium ! com
[Download RAW message or body]

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;


-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-commits mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic