check version number

This commit is contained in:
john30
2017-01-08 16:47:58 +01:00
parent 6f384beb4d
commit b96d2c32f5
+6
View File
@@ -154,6 +154,12 @@ MqttHandler::MqttHandler(BusHandler* busHandler, MessageMap* messages)
if (!enabled) {
return;
}
int major = -1;
mosquitto_lib_version(&major, NULL, NULL);
if (major!=LIBMOSQUITTO_MAJOR) {
logOtherError("mqtt", "invalid mosquitto version %d instead of %d", major, LIBMOSQUITTO_MAJOR);
return;
}
if (m_topicCols.empty()) {
if (m_topicStrs.empty()) {
m_topicStrs.push_back("");