[svn] commit: r2333 - /branches/trac221/src/bin/auth/auth_srv.cc

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Jun 29 22:26:18 UTC 2010


Author: jinmei
Date: Tue Jun 29 22:26:18 2010
New Revision: 2333

Log:
fixed one remaining bug: check rcode given by Xfrin.
all tests pass.

Modified:
    branches/trac221/src/bin/auth/auth_srv.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 29 22:26:18 2010
@@ -434,19 +434,20 @@
         const unsigned int seq =
             session_with_xfrin_.group_sendmsg(notify_command, "Xfrin",
                                               "*", "*");
-        ElementPtr env, answer;
+        ElementPtr env, answer, parsed_answer;
         session_with_xfrin_.group_recvmsg(env, answer, false, seq);
         int rcode;
-        parseAnswer(rcode, answer);
-    } catch (const isc::data::ParseError &err) {
+        parsed_answer = parseAnswer(rcode, answer);
+        if (rcode != 0) {
+            if (verbose_mode_) {
+                cerr << "[b10-auth] failed to notify Xfrin: "
+                     << parsed_answer->str() << endl; 
+            }
+            return (false);
+        }
+    } catch (const Exception& ex) {
         if (verbose_mode_) {
-            cerr << "create notfiy command failed: " << err.what() << endl;
-        }
-        return (false);
-    } catch (const isc::Exception& err) {
-        if (verbose_mode_) {
-            cerr << "[b10-auth] communicate with xfrin module failed: "
-                << err.what() << endl;
+            cerr << "[b10-auth] failed to notify Xfrin: " << ex.what() << endl;
         }
         return (false);
     }




More information about the bind10-changes mailing list