[svn] commit: r2221 - in /branches/trac221/src/bin/auth: auth_srv.cc tests/auth_srv_unittest.cc

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Jun 22 15:15:38 UTC 2010


Author: hanfeng
Date: Tue Jun 22 15:15:37 2010
New Revision: 2221

Log:
update the logic for ixfr that if error happen, we will ignore all the message

Modified:
    branches/trac221/src/bin/auth/auth_srv.cc
    branches/trac221/src/bin/auth/tests/auth_srv_unittest.cc

Modified: branches/trac221/src/bin/auth/auth_srv.cc
==============================================================================
--- branches/trac221/src/bin/auth/auth_srv.cc (original)
+++ branches/trac221/src/bin/auth/auth_srv.cc Tue Jun 22 15:15:37 2010
@@ -387,10 +387,8 @@
             cerr << "[b10-auth] Error in connection with xfrin module: " << err.what()
                  << endl;
             }
-            makeErrorMessage(message, response_renderer, Rcode::SERVFAIL(),
-                             verbose_mode_);
             is_xfrin_session_established_ = false;
-            return (true);
+            return (false);
         }
     }
 
@@ -415,16 +413,12 @@
             cerr << "[b10-auth] Send message to xfrin module failed: " << err.what()
                 << endl;
         }
-        makeErrorMessage(message, response_renderer, Rcode::SERVFAIL(),
-                verbose_mode_);
-        return (true);
+        return (false);
     } catch ( CCSessionError &err) {
         if (verbose_mode_) {
             cerr << "[b10-auth] Receive wrong response from xfrin module: " << err.what() << endl;
-        makeErrorMessage(message, response_renderer, Rcode::SERVFAIL(),
-                verbose_mode_);
-        }
-        return (true);
+        }
+        return (false);
     }
     
     message.makeResponse();

Modified: branches/trac221/src/bin/auth/tests/auth_srv_unittest.cc
==============================================================================
--- branches/trac221/src/bin/auth/tests/auth_srv_unittest.cc (original)
+++ branches/trac221/src/bin/auth/tests/auth_srv_unittest.cc Tue Jun 22 15:15:37 2010
@@ -248,10 +248,10 @@
 TEST_F(AuthSrvTest, notifyInTest) {
     createDataFromFile("notifyin_fromwire");
     parse_message.clear(Message::PARSE);
-    EXPECT_EQ(true, server.processMessage(*io_message, parse_message,
+    EXPECT_EQ(false, server.processMessage(*io_message, parse_message,
                                               response_renderer));
-    headerCheck(parse_message, default_qid, Rcode::NOERROR(), Opcode::NOTIFY().getCode(), QR_FLAG,
-                    1, 0, 0, 0);
+    //headerCheck(parse_message, default_qid, Rcode::SERVFAIL(), Opcode::NOTIFY().getCode(), QR_FLAG,
+    //                1, 0, 0, 0);
 }
 
 




More information about the bind10-changes mailing list