ofp: send events to others before calling own handlers
Some own handlers change the state so needs to send events before calling own handlers. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
a85cb741ec
commit
9fcc42d2e1
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user