[openweave] Initial Thread rendezvous impl.
A basic Thread rendezvous implementation. Sets Thread to be joinable,
and responds appropriately.
Bug: 58249
Change-Id: I0c17d1ad255a92c03a2b26a921ed0c8c638add50
diff --git a/src/adaptations/device-layer/include/Weave/DeviceLayer/internal/GenericNetworkProvisioningServerImpl.ipp b/src/adaptations/device-layer/include/Weave/DeviceLayer/internal/GenericNetworkProvisioningServerImpl.ipp
index 3eaf343..81dddc4 100644
--- a/src/adaptations/device-layer/include/Weave/DeviceLayer/internal/GenericNetworkProvisioningServerImpl.ipp
+++ b/src/adaptations/device-layer/include/Weave/DeviceLayer/internal/GenericNetworkProvisioningServerImpl.ipp
@@ -776,16 +776,33 @@
ExitNow();
}
- // TODO(fx.dev/bug/58249): implement this
+#if defined(__Fuchsia__)
+ err = ThreadStackMgrImpl().SetThreadJoinable(true);
+ if (err != WEAVE_NO_ERROR)
+ {
+ SendStatusReport(kWeaveProfile_Common, kStatus_InternalError);
+ ExitNow();
+ }
+#else
+ SendStatusReport(kWeaveProfile_Common, kStatus_NotAvailable);
ExitNow(err = WEAVE_ERROR_UNSUPPORTED_WEAVE_FEATURE);
+#endif
}
// Otherwise the request is to stop the Thread rendezvous...
else
{
- // TODO(fx.dev/bug/58249): In order to support tests that disable rendezvous mode,
- // make the disable operation a no-op instead of failing.
- // When EnableThreadRendezvous is supported, add the implementation to disable it here.
+#if defined(__Fuchsia__)
+ err = ThreadStackMgrImpl().SetThreadJoinable(false);
+ if (err != WEAVE_NO_ERROR)
+ {
+ SendStatusReport(kWeaveProfile_Common, kStatus_InternalError);
+ ExitNow();
+ }
+#else
+ SendStatusReport(kWeaveProfile_Common, kStatus_NotAvailable);
+ ExitNow(err = WEAVE_ERROR_UNSUPPORTED_WEAVE_FEATURE);
+#endif
}
#endif // WEAVE_DEVICE_CONFIG_ENABLE_THREAD