remove unnecessare set_buffer_size
This commit is contained in:
@@ -472,8 +472,7 @@ bool NetworkLock::comparePrefixedPath(const char *fullPath, const char *subPath)
|
|||||||
return strcmp(fullPath, prefixedPath) == 0;
|
return strcmp(fullPath, prefixedPath) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void NetworkLock::publishHASSConfig(char *deviceType, const char *baseTopic, char *name, char *uidString, char *lockAction,
|
||||||
NetworkLock::publishHASSConfig(char *deviceType, const char *baseTopic, char *name, char *uidString, char *lockAction,
|
|
||||||
char *unlockAction, char *openAction, char *lockedState, char *unlockedState)
|
char *unlockAction, char *openAction, char *lockedState, char *unlockedState)
|
||||||
{
|
{
|
||||||
_network->publishHASSConfig(deviceType, baseTopic, name, uidString, lockAction, unlockAction, openAction, lockedState, unlockedState);
|
_network->publishHASSConfig(deviceType, baseTopic, name, uidString, lockAction, unlockAction, openAction, lockedState, unlockedState);
|
||||||
|
|||||||
@@ -743,8 +743,10 @@ boolean PubSubClient::setBufferSize(uint16_t size) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this->bufferSize == 0) {
|
if (this->bufferSize == 0) {
|
||||||
|
Serial.print("MALLOC: "); Serial.println(size);
|
||||||
this->buffer = (uint8_t*)malloc(size);
|
this->buffer = (uint8_t*)malloc(size);
|
||||||
} else {
|
} else {
|
||||||
|
Serial.print("REALLOC: "); Serial.println(size);
|
||||||
uint8_t* newBuffer = (uint8_t*)realloc(this->buffer, size);
|
uint8_t* newBuffer = (uint8_t*)realloc(this->buffer, size);
|
||||||
if (newBuffer != NULL) {
|
if (newBuffer != NULL) {
|
||||||
this->buffer = newBuffer;
|
this->buffer = newBuffer;
|
||||||
|
|||||||
@@ -40,8 +40,6 @@ void W5500Device::initialize()
|
|||||||
Ethernet.init(ETHERNET_CS_PIN);
|
Ethernet.init(ETHERNET_CS_PIN);
|
||||||
_ethClient = new EthernetClient();
|
_ethClient = new EthernetClient();
|
||||||
_mqttClient = new PubSubClient(*_ethClient);
|
_mqttClient = new PubSubClient(*_ethClient);
|
||||||
_mqttClient->setBufferSize(_mqttMaxBufferSize);
|
|
||||||
|
|
||||||
|
|
||||||
if(_preferences->getBool(preference_mqtt_log_enabled))
|
if(_preferences->getBool(preference_mqtt_log_enabled))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -98,8 +98,6 @@ void WifiDevice::initialize()
|
|||||||
onDisconnected();
|
onDisconnected();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
_mqttClient->setBufferSize(_mqttMaxBufferSize);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WifiDevice::reconfigure()
|
void WifiDevice::reconfigure()
|
||||||
|
|||||||
Reference in New Issue
Block a user