You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following issue concerns class
org.nhindirect.stagent.cert.impl.LdapPublicCertUtilImpl
The Java RI is failing DCDTv3 discovery testcase: D16 - Certificate discovery
in LDAP based on SRV weight value
Existing code used to order the SRV records
protected static class SRVRecordComparitor implements Comparator<Record>
{
@Override
public int compare(Record rec1, Record rec2)
{
if (((SRVRecord)rec1).getPriority() == ((SRVRecord)rec2).getPriority())
return 0;
return (((SRVRecord)rec1).getPriority() < ((SRVRecord)rec2).getPriority()) ? -1 : 1;
}
}
While the respective RFC (http://www.ietf.org/rfc/rfc2782.txt) only
advises/suggests this ordering the DCDTv3 test tool requires this ordering to
be in place.
Seeing the fix applied to the .Net RI - Revision 4d5d80baf299: "Fixing Priority
versus Weight ordering bug" and reading http://en.wikipedia.org/wiki/SRV_record
I think the code should instead look as follows, initial tests of the following
code are positive
protected static class SRVRecordComparitor implements Comparator<Record>
{
@Override
public int compare(Record rec1, Record rec2)
{
SRVRecord srv1 = (SRVRecord)rec1;
SRVRecord srv2 = (SRVRecord)rec2;
if (srv1.getPriority() == srv2.getPriority() && srv1.getWeight() == srv2.getWeight())
return 0;
return (srv1.getPriority() < srv2.getPriority()) ? -1 : (srv1.getPriority() > srv2.getPriority()) ? 1 : (srv1.getWeight() < srv2.getWeight()) ? 1 : -1;
}
}
Original issue reported on code.google.com by [email protected] on 23 Jul 2014 at 9:38
The text was updated successfully, but these errors were encountered:
I was made aware of this issue as soon as the new version of the discovery tool
came out. I made a fix for it a few weeks ago, and have not checked it in yet.
I will get a fix version of the agent out ASAP.
Original issue reported on code.google.com by
[email protected]
on 23 Jul 2014 at 9:38The text was updated successfully, but these errors were encountered: