Parcourir la source

- corrected the condition for the case of !-4
- (minor style change) simplified some if conditions


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1132 e5f2f494-b856-4b98-b285-d166d9295462

JINMEI Tatuya il y a 15 ans
Parent
commit
a899152754
1 fichiers modifiés avec 7 ajouts et 11 suppressions
  1. 7 11
      src/bin/auth/main.cc

+ 7 - 11
src/bin/auth/main.cc

@@ -161,7 +161,7 @@ main(int argc, char* argv[]) {
             exit(1);
         }
     }
-    if (!ipv6_only) {
+    if (!ipv4_only) {
         ps6 = getSocket(AF_INET6, port);
         if (ps6 < 0) {
             if (ps4 < 0) {
@@ -208,17 +208,13 @@ main(int argc, char* argv[]) {
                 throw FatalError("select error");
             }
 
-            if (ps4 >= 0) {
-                if (FD_ISSET(ps4, &fds)) {
-                    ++counter;
-                    auth_server->processMessage(ps4);
-                }
+            if (ps4 >= 0 && FD_ISSET(ps4, &fds)) {
+                ++counter;
+                auth_server->processMessage(ps4);
             }
-            if (ps6 >= 0) {
-                if (FD_ISSET(ps6, &fds)) {
-                    ++counter;
-                    auth_server->processMessage(ps6);
-                }
+            if (ps6 >= 0 && FD_ISSET(ps6, &fds)) {
+                ++counter;
+                auth_server->processMessage(ps6);
             }
     
             if (FD_ISSET(ss, &fds)) {