Simplified IPC code to use less different IPC messages. Share more code. More qork on MQTT code.

This commit is contained in:
Martin Preuss
2023-10-01 21:31:02 +02:00
parent 0f896c1729
commit 1e27223dfa
50 changed files with 1326 additions and 698 deletions

View File

@@ -73,6 +73,8 @@ int AqHomeMqtt_Init(AQHOME_MQTT *aqh, int argc, char **argv)
}
aqh->dbArgs=dbArgs;
aqh->timeout=GWEN_DB_GetIntValue(dbArgs, "timeout", 0, 0);
s=GWEN_DB_GetCharValue(dbArgs, "pidfile", 0, AQHOME_MQTT_DEFAULT_PIDFILE);
if (s && *s) {
AqHomeMqtt_SetPidFile(aqh, s);
@@ -83,6 +85,8 @@ int AqHomeMqtt_Init(AQHOME_MQTT *aqh, int argc, char **argv)
}
}
aqh->rootEndpoint=GWEN_MsgEndpoint_new("root", 0);
rv=_setupMqtt(aqh, dbArgs);
if (rv<0) {
DBG_ERROR(NULL, "Error setting up connection to broker (%d)", rv);