[Xorp-hackers] [PATCH 3/3] Reverted some unnecessary changes.
ss at comp.lancs.ac.uk
ss at comp.lancs.ac.uk
Tue Mar 8 05:27:08 PST 2011
From: Steven Simpson <ss at comp.lancs.ac.uk>
---
xorp/libxipc/finder_messenger.cc | 2 +-
xorp/libxipc/xrl_cmd_map.cc | 2 +-
xorp/libxipc/xrl_cmd_map.hh | 2 +-
xorp/libxipc/xrl_router.cc | 2 +-
xorp/libxipc/xrl_router.hh | 2 +-
xorp/rtrmgr/task.cc | 8 +-------
6 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/xorp/libxipc/finder_messenger.cc b/xorp/libxipc/finder_messenger.cc
index 27253e4..463c175 100644
--- a/xorp/libxipc/finder_messenger.cc
+++ b/xorp/libxipc/finder_messenger.cc
@@ -110,7 +110,7 @@ FinderMessengerBase::dispatch_xrl_cb(const XrlCmdError &e,
const XrlArgs *reply_args,
uint32_t seqno)
{
- reply(seqno, e, reply_args);
+ reply(seqno, e, XrlCmdError::OKAY() == e ? reply_args : 0);
}
void
diff --git a/xorp/libxipc/xrl_cmd_map.cc b/xorp/libxipc/xrl_cmd_map.cc
index 0d25952..487f68e 100644
--- a/xorp/libxipc/xrl_cmd_map.cc
+++ b/xorp/libxipc/xrl_cmd_map.cc
@@ -42,7 +42,7 @@ XrlCmdMap::add_handler(const XrlCmdEntry& cmd)
}
bool
-XrlCmdMap::add_handler(const string& cmd, XrlRecvCallback rcb)
+XrlCmdMap::add_handler(const string& cmd, const XrlRecvCallback& rcb)
{
return add_handler(XrlCmdEntry(cmd, rcb));
}
diff --git a/xorp/libxipc/xrl_cmd_map.hh b/xorp/libxipc/xrl_cmd_map.hh
index b5336cf..177c066 100644
--- a/xorp/libxipc/xrl_cmd_map.hh
+++ b/xorp/libxipc/xrl_cmd_map.hh
@@ -71,7 +71,7 @@ public:
const string& name() const { return _name; }
- virtual bool add_handler(const string& cmd, XrlRecvCallback rcb);
+ virtual bool add_handler(const string& cmd, const XrlRecvCallback& rcb);
virtual bool remove_handler (const string& name);
diff --git a/xorp/libxipc/xrl_router.cc b/xorp/libxipc/xrl_router.cc
index 4274bd4..b93a26f 100644
--- a/xorp/libxipc/xrl_router.cc
+++ b/xorp/libxipc/xrl_router.cc
@@ -372,7 +372,7 @@ XrlRouter::finalize()
}
bool
-XrlRouter::add_handler(const string& cmd, XrlRecvCallback rcb)
+XrlRouter::add_handler(const string& cmd, const XrlRecvCallback& rcb)
{
if (finalized()) {
XLOG_ERROR("Attempting to add handler after XrlRouter finalized. Handler = \"%s\"", cmd.c_str());
diff --git a/xorp/libxipc/xrl_router.hh b/xorp/libxipc/xrl_router.hh
index 700152a..5e17305 100644
--- a/xorp/libxipc/xrl_router.hh
+++ b/xorp/libxipc/xrl_router.hh
@@ -130,7 +130,7 @@ public:
* @param rcb callback to be dispatched when XRL method is received for
* invocation.
*/
- bool add_handler(const string& cmd, XrlRecvCallback rcb);
+ bool add_handler(const string& cmd, const XrlRecvCallback& rcb);
/**
* @return EventLoop used by XrlRouter instance.
diff --git a/xorp/rtrmgr/task.cc b/xorp/rtrmgr/task.cc
index 727282b..d904a31 100644
--- a/xorp/rtrmgr/task.cc
+++ b/xorp/rtrmgr/task.cc
@@ -1408,16 +1408,10 @@ TaskXrlItem::execute_done(const XrlError& err, XrlArgs* xrl_args)
break;
case NO_FINDER:
- // The error was a fatal one for the target - we now
- // consider the target to be fatally wounded.
- XLOG_ERROR("NO_FINDER: %s", err.str().c_str());
- fatal = true;
- break;
-
case SEND_FAILED:
// The error was a fatal one for the target - we now
// consider the target to be fatally wounded.
- XLOG_ERROR("SEND_FAILED: %s", err.str().c_str());
+ XLOG_ERROR("%s", err.str().c_str());
fatal = true;
break;
--
1.7.0.4
More information about the Xorp-hackers
mailing list