{
list = new LinkedList(this.jmDNSImpl.getServices().values());
}
for (Iterator i = list.iterator(); i.hasNext();)
{
ServiceInfoImpl info = (ServiceInfoImpl) i.next();
synchronized (info)
{
if (info.getState() == taskState && info.getTask() == this)
{
info.advanceState();
// logger.fine("run() JmDNS probing " + info.getQualifiedName() + " state " + info.getState());
if (out == null)
{
out = new DNSOutgoing(DNSConstants.FLAGS_QR_QUERY);
out.addQuestion(new DNSQuestion(info.getQualifiedName(), DNSConstants.TYPE_ANY, DNSConstants.CLASS_IN));
}
// the "unique" flag should be not set here because these answers haven't been proven unique yet
// this means the record will not exactly match the announcement record
out.addAuthorativeAnswer(new DNSRecord.Service(info.getQualifiedName(),
DNSConstants.TYPE_SRV, DNSConstants.CLASS_IN, DNSConstants.DNS_TTL,
info.getPriority(), info.getWeight(), info.getPort(), this.jmDNSImpl.getLocalHost().getName()));
}
}
}
if (out != null)
{