Unify device controls and restore the WiFi console
This commit is contained in:
1 parent
3746f9d5f4
commit
4c8aad5b16
44 files changed
+3573
-2948
No files matched your search
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <stddef.h> // size_t / NULL for the reply classifiers below
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
// Fork-owned, dependency-free spec for the WebConfig "config batch / reboot /
|
||||
// stop" decision + timing core, plus its host tests (test/test_webconfig_batch/).
|
||||
@@ -320,6 +321,14 @@ static inline bool cliWriteSucceeded(const char* reply) {
|
||||
return reply != NULL && reply[0] == 'O' && reply[1] == 'K';
|
||||
}
|
||||
|
||||
// CommonCLI echoes a newly saved password instead of returning "OK". Mask
|
||||
// that success before sending it over HTTP, while preserving unsupported-role
|
||||
// errors from roles such as Companion which have no admin password.
|
||||
static inline bool cliPasswordChanged(const char* reply) {
|
||||
return cliWriteSucceeded(reply)
|
||||
|| (reply != NULL && strncmp(reply, "password now:", 13) == 0);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Reboot fire (.cpp:262-265) and isRebootPending (.cpp:70-74).
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user