BIND 10 trac2768, updated. c32bfa79b248fb9351dafc853ecc0a18ca2e3a66 [2768] Remove some more references
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Mar 11 08:50:06 UTC 2013
The branch, trac2768 has been updated
via c32bfa79b248fb9351dafc853ecc0a18ca2e3a66 (commit)
from 8bab20ff2358dfcc7d7f09520688b9a07bbc1ea3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c32bfa79b248fb9351dafc853ecc0a18ca2e3a66
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Mon Mar 11 09:49:04 2013 +0100
[2768] Remove some more references
They save only little bit of work to the CPU and are suspicious to
casual reader, even when they should be safe in theory.
-----------------------------------------------------------------------
Summary of changes:
src/lib/config/ccsession.cc | 2 +-
src/lib/config/tests/ccsession_unittests.cc | 22 ++++++++++++----------
2 files changed, 13 insertions(+), 11 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/config/ccsession.cc b/src/lib/config/ccsession.cc
index c649e27..78432ab 100644
--- a/src/lib/config/ccsession.cc
+++ b/src/lib/config/ccsession.cc
@@ -869,7 +869,7 @@ ModuleCCSession::rpcCall(const std::string &command, const std::string &group,
arg(group).arg(seq);
groupRecvMsg(env, answer, true, seq);
int rcode;
- const ConstElementPtr &result(parseAnswer(rcode, answer));
+ const ConstElementPtr result(parseAnswer(rcode, answer));
if (rcode == isc::cc::CC_REPLY_NO_RECPT) {
isc_throw(RPCRecipientMissing, result);
} else if (rcode != isc::cc::CC_REPLY_SUCCESS) {
diff --git a/src/lib/config/tests/ccsession_unittests.cc b/src/lib/config/tests/ccsession_unittests.cc
index b7b1267..8d8bb47 100644
--- a/src/lib/config/tests/ccsession_unittests.cc
+++ b/src/lib/config/tests/ccsession_unittests.cc
@@ -62,16 +62,18 @@ protected:
ModuleCCSession mccs(ccspecfile("spec1.spec"), session, NULL, NULL,
false, false);
// Prepare the answer beforehand, it'll block until it gets one
- const ConstElementPtr& reply_el(el(reply));
+ const ConstElementPtr reply_el(el(reply));
session.getMessages()->add(reply_el);
- const ConstElementPtr& result(mccs.rpcCall("test", "Spec2",
- el("{\"param1\": \"Param 1\","
- "\"param2\": \"Param 2\"}")));
- const ConstElementPtr& request(el("[\"Spec2\", \"*\", {"
- " \"command\": [\"test\", {"
- " \"param1\": \"Param 1\","
- " \"param2\": \"Param 2\""
- "}]}, -1, true]"));
+ const ConstElementPtr
+ result(mccs.rpcCall("test", "Spec2",
+ el("{\"param1\": \"Param 1\","
+ "\"param2\": \"Param 2\"}")));
+ const ConstElementPtr
+ request(el("[\"Spec2\", \"*\", {"
+ " \"command\": [\"test\", {"
+ " \"param1\": \"Param 1\","
+ " \"param2\": \"Param 2\""
+ "}]}, -1, true]"));
// The 0th one is from the initialization, to ConfigManager.
// our is the 1st.
EXPECT_TRUE(request->equals(*session.getMsgQueue()->get(1))) <<
@@ -88,7 +90,7 @@ protected:
// Test we can send an RPC (command) and get an answer. The answer is success
// in this case.
TEST_F(CCSessionTest, rpcCallSuccess) {
- const ConstElementPtr &result =
+ const ConstElementPtr result =
rpcCheck("{\"result\": [0, {\"Hello\": \"a\"}]}");
EXPECT_TRUE(el("{\"Hello\": \"a\"}")->equals(*result));
}
More information about the bind10-changes
mailing list