Author: norman
Date: Sun May 21 22:46:16 2006
New Revision: 408575

URL: http://svn.apache.org/viewvc?rev=408575&view=rev
Log:
Fix a bug which throw an temperror if no record of the queried type was found

Modified:
    
james/jspf/trunk/src/main/java/org/apache/james/jspf/DNSServiceXBillImpl.java

Modified: 
james/jspf/trunk/src/main/java/org/apache/james/jspf/DNSServiceXBillImpl.java
URL: 
http://svn.apache.org/viewvc/james/jspf/trunk/src/main/java/org/apache/james/jspf/DNSServiceXBillImpl.java?rev=408575&r1=408574&r2=408575&view=diff
==============================================================================
--- 
james/jspf/trunk/src/main/java/org/apache/james/jspf/DNSServiceXBillImpl.java 
(original)
+++ 
james/jspf/trunk/src/main/java/org/apache/james/jspf/DNSServiceXBillImpl.java 
Sun May 21 22:46:16 2006
@@ -122,9 +122,7 @@
             Lookup query = new Lookup(hostname, Type.TXT);
             records = query.run();
             int queryResult = query.getResult();
-
-            if ((queryResult == Lookup.SUCCESSFUL)
-                    || (queryResult == Lookup.HOST_NOT_FOUND)) {
+            if ((queryResult != Lookup.TRY_AGAIN)) {
                 if (records != null) {
 
                     log.debug("Found " + records.length + " TXT-Records");
@@ -178,8 +176,7 @@
                 records = query.run();
                 int queryResult = query.getResult();
 
-                if ((queryResult == Lookup.SUCCESSFUL)
-                        || (queryResult == Lookup.HOST_NOT_FOUND)) {
+                if ((queryResult != Lookup.TRY_AGAIN)) {
                     if (records != null) {
 
                         log.debug("Found " + records.length + " A-Records");
@@ -239,8 +236,7 @@
                 records = query.run();
                 int queryResult = query.getResult();
 
-                if ((queryResult == Lookup.SUCCESSFUL)
-                        || (queryResult == Lookup.HOST_NOT_FOUND)) {
+                if ((queryResult != Lookup.TRY_AGAIN)) {
                     if (records != null) {
 
                         log.debug("Found " + records.length + " AAAA-Records");
@@ -346,10 +342,8 @@
             records = query.run();
             int queryResult = query.getResult();
 
-            if ((queryResult == Lookup.SUCCESSFUL)
-                    || (queryResult == Lookup.HOST_NOT_FOUND)) {
+            if ((queryResult != Lookup.TRY_AGAIN)) {
                 if (records != null) {
-
                     log.debug("Found " + records.length + " PTR-Records");
 
                     for (int i = 0; i < records.length; i++) {
@@ -440,10 +434,8 @@
             records = query.run();
             int queryResult = query.getResult();
 
-            if ((queryResult == Lookup.SUCCESSFUL)
-                    || (queryResult == Lookup.HOST_NOT_FOUND)) {
+            if ((queryResult != Lookup.TRY_AGAIN)) {
                 if (records != null) {
-
                     log.debug("Found " + records.length + " MX-Records");
 
                     for (int i = 0; i < records.length; i++) {



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to