fix: single point of truth for secure client network

This commit is contained in:
Florian Grandel
2021-12-22 02:53:35 +01:00
parent 59fd3ec598
commit 135e79e4da
4 changed files with 7 additions and 9 deletions

View File

@@ -34,7 +34,7 @@ char* currentDateTime(void);
static const char* theClientStatus[] = { "InPool", "Disconnected", "TryConnecting", "Connecting", "Active", "Asleep", "Awake",
"Lost" };
Client::Client(bool secure)
Client::Client()
{
_packetId = 0;
_snMsgId = 0;
@@ -45,8 +45,7 @@ Client::Client(bool secure)
_willTopic = nullptr;
_willMsg = nullptr;
_connectData = MQTTPacket_Connect_Initializer;
_network = new Network(secure);
_secureNetwork = secure;
_network = new Network();
_sensorNetype = true;
_connAck = nullptr;
_waitWillMsgFlg = false;
@@ -426,7 +425,7 @@ bool Client::isConnecting(void)
bool Client::isSecureNetwork(void)
{
return _secureNetwork;
return _network->isSecure();
}
bool Client::isSensorNetStable(void)