From 8b03bc583b4348d196991d210a57c42008eb2db3 Mon Sep 17 00:00:00 2001 From: Kim JeongWoo Date: Fri, 10 Aug 2018 16:50:23 +0900 Subject: [PATCH] [ONOS-7766] Modify the use of invalidated checkReply methods in Netconf Change-Id: I4400c33373a93926bcc8a397db4f24e141790b63 --- .../netconf/ctl/impl/NetconfSessionMinaImpl.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfSessionMinaImpl.java b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfSessionMinaImpl.java index 56818a36c2..2385f9433c 100644 --- a/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfSessionMinaImpl.java +++ b/protocols/netconf/ctl/src/main/java/org/onosproject/netconf/ctl/impl/NetconfSessionMinaImpl.java @@ -410,7 +410,10 @@ public class NetconfSessionMinaImpl extends AbstractNetconfSession { @Override public String requestSync(String request) throws NetconfException { String reply = sendRequest(request); - checkReply(reply); + if (!checkReply(reply)) { + throw new NetconfException("Request not successful with device " + + deviceInfo + " with reply " + reply); + } return reply; } @@ -494,7 +497,10 @@ public class NetconfSessionMinaImpl extends AbstractNetconfSession { throw new NetconfTransportException(t); } else { // FIXME avoid using checkReply, error handling is weird - checkReply(reply); + if (!checkReply(reply)) { + throw new NetconfTransportException("rpc-request not successful with device " + + deviceInfo + " with reply " + reply); + } return reply; } }, SharedExecutors.getPoolThreadExecutor());