File tree 1 file changed +8
-9
lines changed
1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -62,24 +62,23 @@ CHIP_ERROR SetUpCodePairer::Connect(RendezvousInformationFlag rendezvousInformat
62
62
VerifyOrReturnError (searchOverAll || CHIP_NO_ERROR == err, err);
63
63
}
64
64
65
- if (searchOverAll || rendezvousInformation == RendezvousInformationFlag::kOnNetwork )
65
+ if (searchOverAll || rendezvousInformation == RendezvousInformationFlag::kSoftAP )
66
66
{
67
- if (CHIP_NO_ERROR ==
68
- (err = StartDiscoverOverIP (isShort ? static_cast <uint16_t >((discriminator >> 8 ) & 0x0F ) : discriminator, isShort)))
67
+ if (CHIP_NO_ERROR == (err = StartDiscoverOverSoftAP (discriminator, isShort)))
69
68
{
70
69
isRunning = true ;
71
70
}
72
71
VerifyOrReturnError (searchOverAll || CHIP_NO_ERROR == err, err);
73
72
}
74
73
75
- if (searchOverAll || rendezvousInformation == RendezvousInformationFlag::kSoftAP )
74
+ // We always want to search on network because any node that has already been commissioned will use on-network regardless of the
75
+ // QR code flag.
76
+ if (CHIP_NO_ERROR ==
77
+ (err = StartDiscoverOverIP (isShort ? static_cast <uint16_t >((discriminator >> 8 ) & 0x0F ) : discriminator, isShort)))
76
78
{
77
- if (CHIP_NO_ERROR == (err = StartDiscoverOverSoftAP (discriminator, isShort)))
78
- {
79
- isRunning = true ;
80
- }
81
- VerifyOrReturnError (searchOverAll || CHIP_NO_ERROR == err, err);
79
+ isRunning = true ;
82
80
}
81
+ VerifyOrReturnError (searchOverAll || CHIP_NO_ERROR == err, err);
83
82
84
83
return isRunning ? CHIP_NO_ERROR : CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
85
84
}
You can’t perform that action at this time.
0 commit comments