Simplified IPC code to use less different IPC messages. Share more code. More qork on MQTT code.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user