Some own handlers change the state so needs to send events before calling own handlers.
Signed-off-by: FUJITA Tomonori <fujita.tomon...@lab.ntt.co.jp> --- ryu/controller/controller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ryu/controller/controller.py b/ryu/controller/controller.py index bf53f7e..c753f01 100644 --- a/ryu/controller/controller.py +++ b/ryu/controller/controller.py @@ -170,13 +170,13 @@ class Datapath(object): version, msg_type, msg_len, xid, buf) #LOG.debug('queue msg %s cls %s', msg, msg.__class__) ev = ofp_event.ofp_msg_to_ev(msg) + self.ofp_brick.send_event_to_observers(ev, self.state) + handlers = self.ofp_brick.get_handlers(ev) for handler in handlers: if self.state in handler.dispatchers: handler(ev) - self.ofp_brick.send_event_to_observers(ev, self.state) - buf = buf[required_len:] required_len = ofproto_common.OFP_HEADER_SIZE -- 1.7.12.4 (Apple Git-37) ------------------------------------------------------------------------------ Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev _______________________________________________ Ryu-devel mailing list Ryu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ryu-devel