Menu

#127 3.4.1, Failure to resolve services

open-accepted
5
2012-12-04
2012-04-14
Anonymous
No

It seems that jmdns version 3.4.1 fails to resolve a service if the A or AAAA record was the last one to be announced. Looking at the code it seems that the updateRecord method tries to resolve the service type from the DNS Address record, which is not possible. This patch seems to work:

Index: ServiceInfoImpl.java

--- ServiceInfoImpl.java (revision 335)
+++ ServiceInfoImpl.java (working copy)
@@ -920,8 +920,7 @@
if (serviceUpdated && this.hasData()) {
JmDNSImpl dns = this.getDns();
if (dns != null) {
- ServiceEvent event = ((DNSRecord) rec).getServiceEvent(dns);
- event = new ServiceEventImpl(dns, event.getType(), event.getName(), this);
+ ServiceEvent event = new ServiceEventImpl(dns, this.getType(), this.getName(), this);
dns.handleServiceResolved(event);
}
}

Discussion

  • Pierre Frisch

    Pierre Frisch - 2012-04-16

    commit -m "Failure to resolve services - ID: 3517826" /Users/pierre/Projects/workspace/jmdns/CHANGELOG.txt /Users/pierre/Projects/workspace/jmdns/src/main/java/javax/jmdns/impl/ServiceInfoImpl.java
    Sending /Users/pierre/Projects/workspace/jmdns/CHANGELOG.txt
    Sending /Users/pierre/Projects/workspace/jmdns/src/main/java/javax/jmdns/impl/ServiceInfoImpl.java
    Transmitting file data ...
    Committed revision 336.

     
  • Pierre Frisch

    Pierre Frisch - 2012-04-16
    • status: open --> pending-fixed
     
  • Pierre Frisch

    Pierre Frisch - 2012-04-16
    • status: pending-fixed --> open-accepted
     
  • Pierre Frisch

    Pierre Frisch - 2012-04-16

    This patch does not work. Reverting.

    Could you please give more detail of what the original problem was?

     
  • Pierre Frisch

    Pierre Frisch - 2012-06-11
    • status: open-accepted --> pending-accepted
     
  • Pierre Frisch

    Pierre Frisch - 2012-12-04
    • status: pending-accepted --> open-accepted
     
MongoDB Logo MongoDB