Signed-off-by: Isaku Yamahata <[email protected]>
---
 ryu/topology/switches.py |   10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/ryu/topology/switches.py b/ryu/topology/switches.py
index d507506..b5584dc 100644
--- a/ryu/topology/switches.py
+++ b/ryu/topology/switches.py
@@ -800,10 +800,7 @@ class Switches(app_manager.RyuApp):
             switches.append(self._get_switch(dpid))
 
         rep = event.EventSwitchReply(req.src, switches)
-        if req.sync:
-            self.send_reply(rep)
-        else:
-            self.send_event(req.src, rep)
+        self.reply_to_request(req, rep)
 
     @set_ev_cls(event.EventLinkRequest)
     def link_request_handler(self, req):
@@ -815,10 +812,7 @@ class Switches(app_manager.RyuApp):
         else:
             links = [link for link in self.links if link.src.dpid == dpid]
         rep = event.EventLinkReply(req.src, dpid, links)
-        if req.sync:
-            self.send_reply(rep)
-        else:
-            self.send_event(req.src, rep)
+        self.reply_to_request(req, rep)
 
 
 def get_switch(app, dpid=None):
-- 
1.7.10.4


------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to