2013/3/18 FUJITA Tomonori <[email protected]>:
> On Mon, 11 Mar 2013 19:09:01 +0900
> Yoshihiro Kaneko <[email protected]> wrote:
>
>> I suppose that the list of handler to be called for the OFP message
>> should be kept even if the state is changed in a handler.
>> Is this correct?
>>
>> diff --git a/ryu/controller/controller.py b/ryu/controller/controller.py
>> index c753f01..79c6316 100644
>> --- a/ryu/controller/controller.py
>> +++ b/ryu/controller/controller.py
>> @@ -172,10 +172,11 @@ class Datapath(object):
>>                  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)
>> +                handlers = [handler for handler in
>> +                            self.ofp_brick.get_handlers(ev) if self.state in
>> +                            handler.dispatchers]
>>                  for handler in handlers:
>> -                    if self.state in handler.dispatchers:
>> -                        handler(ev)
>> +                    handler(ev)
>>
>>                  buf = buf[required_len:]
>>                  required_len = ofproto_common.OFP_HEADER_SIZE
>
> Looks good. You tried this with our OpenStack testings?

Yes. The test passed successfully.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to