Skip to content

Commit

Permalink
Update ConfigJson.cpp - set default password to blank and ssid to uns…
Browse files Browse the repository at this point in the history
…et-ssid
  • Loading branch information
tyeth authored Nov 21, 2024
1 parent e898d1b commit 5fee86b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/provisioning/ConfigJson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ void convertToJson(const networkConfig &src, JsonVariant dst) {

// Extracts a network configuration structure from a JSON variant
void convertFromJson(JsonVariantConst src, networkConfig &dst) {
strlcpy(dst.ssid, src["network_ssid"] | "testvar", sizeof(dst.ssid));
strlcpy(dst.pass, src["network_password"] | "testvar", sizeof(dst.pass));
strlcpy(dst.ssid, src["network_ssid"] | "unset-ssid", sizeof(dst.ssid));
strlcpy(dst.pass, src["network_password"] | "", sizeof(dst.pass));
}

// Converts a secretsConfig structure to a JSON variant
Expand Down Expand Up @@ -83,4 +83,4 @@ void convertFromJson(JsonVariantConst src, displayConfig &dst) {
dst.height = src["height"] | 64;
dst.rotation = src["rotation"] | 0;
dst.spiConfig = src["spi_config"];
}
}

0 comments on commit 5fee86b

Please sign in to comment.