Don't mess up old wifi
@@ -2340,8 +2340,16 @@ int DeRestPluginPrivate::configureWifi(const ApiRequest &req, ApiResponse &rsp)
return REQ_READY_SEND;
}
+ if (gwWifiType == "accesspoint")
+ {
gwWifiName = name;
}
+ else
+ {
+ gwWifiClientName = name;
+ gwWifiName = name;
+ }
+ }
if (map.contains("password"))
{
QString password = map["password"].toString();
@@ -2353,7 +2361,16 @@ int DeRestPluginPrivate::configureWifi(const ApiRequest &req, ApiResponse &rsp)
return REQ_READY_SEND;
}
+ if (gwWifiType == "accesspoint")
+ {
gwWifiPw = password;
+ }
+ else
+ {
+ gwWifiClientPw = password;
+ gwWifiPw = password;
+ }
+
}
if (map.contains("wifi"))
