added list of received and unknown topics.
This commit is contained in:
@@ -58,6 +58,7 @@ AQH_STORAGE *AQH_Storage_new(void)
|
||||
sto->mqttTopicList=AQH_MqttTopic_List_new();
|
||||
sto->valueList=AQH_Value_List_new();
|
||||
sto->dataFileList=AQH_DataFile_List_new();
|
||||
sto->recvdTopicList=GWEN_StringList_new();
|
||||
|
||||
return sto;
|
||||
}
|
||||
@@ -72,6 +73,7 @@ void AQH_Storage_free(AQH_STORAGE *sto)
|
||||
AQH_MqttTopic_List_free(sto->mqttTopicList);
|
||||
AQH_Device_List_free(sto->deviceList);
|
||||
AQH_Room_List_free(sto->roomList);
|
||||
GWEN_StringList_free(sto->recvdTopicList);
|
||||
free(sto->dataFileFolder);
|
||||
free(sto->stateFile);
|
||||
|
||||
@@ -98,6 +100,15 @@ void AQH_Storage_SetStateFile(AQH_STORAGE *sto, const char *s)
|
||||
|
||||
|
||||
|
||||
GWEN_STRINGLIST *AQH_Storage_GetRecvdTopicList(const AQH_STORAGE *sto)
|
||||
{
|
||||
return sto?sto->recvdTopicList:NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void AQH_Storage_AddRoom(AQH_STORAGE *sto, AQH_ROOM *r)
|
||||
{
|
||||
if (sto && r) {
|
||||
@@ -363,6 +374,7 @@ void AQH_Storage_HandleMqttPublish(AQH_STORAGE *sto, const char *sTopic, const c
|
||||
}
|
||||
else {
|
||||
DBG_INFO(AQH_LOGDOMAIN, "Unknown MQTT topic \"%s\"", sTopic);
|
||||
GWEN_StringList_AppendString(sto->recvdTopicList, sTopic, 0, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user