You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by no...@apache.org on 2006/10/01 16:19:41 UTC
svn commit: r451749 -
/james/jspf/trunk/src/main/java/org/apache/james/jspf/terms/PTRMechanism.java
Author: norman
Date: Sun Oct 1 07:19:40 2006
New Revision: 451749
URL: http://svn.apache.org/viewvc?view=rev&rev=451749
Log:
Fix 2 junit tests which was failing in the updated rfc4408 testsuite
Modified:
james/jspf/trunk/src/main/java/org/apache/james/jspf/terms/PTRMechanism.java
Modified: james/jspf/trunk/src/main/java/org/apache/james/jspf/terms/PTRMechanism.java
URL: http://svn.apache.org/viewvc/james/jspf/trunk/src/main/java/org/apache/james/jspf/terms/PTRMechanism.java?view=diff&rev=451749&r1=451748&r2=451749
==============================================================================
--- james/jspf/trunk/src/main/java/org/apache/james/jspf/terms/PTRMechanism.java (original)
+++ james/jspf/trunk/src/main/java/org/apache/james/jspf/terms/PTRMechanism.java Sun Oct 1 07:19:40 2006
@@ -71,23 +71,18 @@
domainList = domainList.subList(0, spfData.getDnsProbe().getRecordLimit()-1);
// throw new PermErrorException("Maximum PTR lookup count reached");
}
-
-
+
for (int i = 0; i < domainList.size(); i++) {
// Get a record for this
List aList = spfData.getDnsProbe().getRecords(
(String) domainList.get(i), DNSService.A);
- // TODO check this: this is a direct result of the NoneException
- // removal, and I'm not sure this is correct: maybe we should continue
- if (aList == null) {
- return false;
- }
-
- for (int j = 0; j < aList.size(); j++) {
- if (aList.get(j).equals(spfData.getIpAddress())) {
- validatedHosts.add(domainList.get(i));
+ if (aList != null) {
+ for (int j = 0; j < aList.size(); j++) {
+ if (aList.get(j).equals(spfData.getIpAddress())) {
+ validatedHosts.add(domainList.get(i));
+ }
}
}
}
@@ -95,6 +90,7 @@
// Check if we match one of this ptr!
for (int j = 0; j < validatedHosts.size(); j++) {
compareDomain = (String) validatedHosts.get(j);
+
if (compareDomain.equals(host)
|| compareDomain.endsWith("." + host)) {
return true;
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org