aqhome: completed adapting to msgio2 interface.

This commit is contained in:
Martin Preuss
2023-07-12 13:33:04 +02:00
parent 39987b31c7
commit 08c3875a26
66 changed files with 1765 additions and 3914 deletions

View File

@@ -74,6 +74,7 @@ void AqHomed_free(AQHOMED *aqh)
free(aqh->writeFolder);
free(aqh->pidFile);
free(aqh->dbFile);
free(aqh->mqttTopicPrefix);
GWEN_FREE_OBJECT(aqh);
}
@@ -177,7 +178,20 @@ void AqHomed_SetDbFile(AQHOMED *aqh, const char *s)
const char *AqHomed_GetMqttTopicPrefix(const AQHOMED *aqh)
{
return aqh?aqh->mqttTopicPrefix:NULL;
}
void AqHomed_SetMqttTopicPrefix(AQHOMED *aqh, const char *s)
{
if (aqh) {
free(aqh->mqttTopicPrefix);
aqh->mqttTopicPrefix=s?strdup(s):NULL;
}
}