Browse Source

[trac931] trivial suggested changes:
- typo in comment
- test NULL explicitly
- constify

JINMEI Tatuya 14 years ago
parent
commit
a206dbd543
2 changed files with 3 additions and 3 deletions
  1. 1 1
      src/bin/auth/auth_srv.cc
  2. 2 2
      src/bin/auth/tests/auth_srv_unittest.cc

+ 1 - 1
src/bin/auth/auth_srv.cc

@@ -467,7 +467,7 @@ AuthSrv::processMessage(const IOMessage& io_message, MessagePtr message,
 
     // Do we do TSIG?
     // The keyring can be null if we're in test
-    if (server_common::keyring && tsig_record) {
+    if (server_common::keyring != NULL && tsig_record != NULL) {
         tsig_context.reset(new TSIGContext(tsig_record->getName(),
                                            tsig_record->getRdata().
                                                 getAlgorithm(),

+ 2 - 2
src/bin/auth/tests/auth_srv_unittest.cc

@@ -248,13 +248,13 @@ TEST_F(AuthSrvTest, AXFRSuccess) {
 // well
 TEST_F(AuthSrvTest, TSIGSigned) {
     // Prepare key, the client message, etc
-    TSIGKey key("key:c2VjcmV0Cg==:hmac-sha1");
+    const TSIGKey key("key:c2VjcmV0Cg==:hmac-sha1");
     TSIGContext context(key);
     UnitTestUtil::createRequestMessage(request_message, opcode, default_qid,
                          Name("version.bind"), RRClass::CH(), RRType::TXT());
     createRequestPacket(request_message, IPPROTO_UDP, &context);
 
-    // Run the message trough the server
+    // Run the message through the server
     isc::server_common::keyring.reset(new TSIGKeyRing);
     isc::server_common::keyring->add(key);
     server.processMessage(*io_message, parse_message, response_obuffer,