File tree 4 files changed +5
-56
lines changed
4 files changed +5
-56
lines changed Original file line number Diff line number Diff line change 19
19
20
20
#include < lib/support/logging/CHIPLogging.h>
21
21
22
+ #include < algorithm>
23
+
22
24
using namespace chip ;
23
25
24
26
namespace mdns {
@@ -282,32 +284,6 @@ Optional<ActiveResolveAttempts::ScheduledAttempt> ActiveResolveAttempts::NextSch
282
284
return Optional<ScheduledAttempt>::Missing ();
283
285
}
284
286
285
- bool ActiveResolveAttempts::ShouldResolveIpAddress (PeerId peerId) const
286
- {
287
- for (auto & item : mRetryQueue )
288
- {
289
- if (item.attempt .IsEmpty ())
290
- {
291
- continue ;
292
- }
293
- if (item.attempt .IsBrowse ())
294
- {
295
- return true ;
296
- }
297
-
298
- if (item.attempt .IsResolve ())
299
- {
300
- auto & data = item.attempt .ResolveData ();
301
- if (data.peerId == peerId)
302
- {
303
- return true ;
304
- }
305
- }
306
- }
307
-
308
- return false ;
309
- }
310
-
311
287
bool ActiveResolveAttempts::IsWaitingForIpResolutionFor (SerializedQNameIterator hostName) const
312
288
{
313
289
for (auto & entry : mRetryQueue )
Original file line number Diff line number Diff line change @@ -288,12 +288,6 @@ class ActiveResolveAttempts
288
288
// / IP resolution.
289
289
bool IsWaitingForIpResolutionFor (SerializedQNameIterator hostName) const ;
290
290
291
- // / Determines if address resolution for the given peer ID is required
292
- // /
293
- // / IP Addresses are required for active operational discovery of specific peers
294
- // / or if an active browse is being performed.
295
- bool ShouldResolveIpAddress (chip::PeerId peerId) const ;
296
-
297
291
// / Check if a browse operation is active for the given discovery type
298
292
bool HasBrowseFor (chip::Dnssd::DiscoveryType type) const ;
299
293
Original file line number Diff line number Diff line change 17
17
#pragma once
18
18
19
19
#include < lib/dnssd/Resolver.h>
20
- #include < lib/dnssd/Types.h>
21
20
#include < lib/dnssd/minimal_mdns/Parser.h>
22
21
#include < lib/dnssd/minimal_mdns/RecordData.h>
23
22
#include < lib/dnssd/minimal_mdns/core/QName.h>
@@ -105,12 +104,6 @@ class IncrementalResolver
105
104
106
105
ServiceNameType GetCurrentType () const { return mServiceNameType ; }
107
106
108
- PeerId OperationalParsePeerId () const
109
- {
110
- VerifyOrReturnValue (IsActiveOperationalParse (), PeerId ());
111
- return mSpecificResolutionData .Get <OperationalNodeData>().peerId ;
112
- }
113
-
114
107
// / Start parsing a new record. SRV records are the records we are mainly
115
108
// / interested on, after which TXT and A/AAAA are looked for.
116
109
// /
Original file line number Diff line number Diff line change 17
17
18
18
#include " Resolver.h"
19
19
20
+ #include < limits>
21
+
20
22
#include < lib/core/CHIPConfig.h>
21
23
#include < lib/dnssd/ActiveResolveAttempts.h>
22
24
#include < lib/dnssd/IncrementalResolve.h>
@@ -371,23 +373,7 @@ void MinMdnsResolver::AdvancePendingResolverStates()
371
373
372
374
if (missing.Has (IncrementalResolver::RequiredInformationBitFlags::kIpAddress ))
373
375
{
374
- if (resolver->IsActiveCommissionParse ())
375
- {
376
- // Browse wants IP addresses
377
- ScheduleIpAddressResolve (resolver->GetTargetHostName ());
378
- }
379
- else if (mActiveResolves .ShouldResolveIpAddress (resolver->OperationalParsePeerId ()))
380
- {
381
- // Keep searching for IP addresses if an active resolve needs these IP addresses
382
- // otherwise ignore the data (received a SRV record without IP address, however we do not
383
- // seem interested in it. Probably just a device that came online).
384
- ScheduleIpAddressResolve (resolver->GetTargetHostName ());
385
- }
386
- else
387
- {
388
- // This IP address is not interesting enough to run another discovery
389
- resolver->ResetToInactive ();
390
- }
376
+ ScheduleIpAddressResolve (resolver->GetTargetHostName ());
391
377
continue ;
392
378
}
393
379
You can’t perform that action at this time.
0 commit comments