fix for older compilers
This commit is contained in:
+11
-15
@@ -237,11 +237,11 @@ KnxHandler::KnxHandler(UserInfo* userInfo, BusHandler* busHandler, MessageMap* m
|
||||
continue;
|
||||
}
|
||||
m_subscribedGlobals[index] = dest|FLAG_READ;
|
||||
m_subscribedGroups[dest|FLAG_READ] = {
|
||||
.messageKey = 0,
|
||||
.globalIndex = index,
|
||||
.lengthFlag = lengthFlag,
|
||||
};
|
||||
groupInfo_t grpInfo;
|
||||
grpInfo.messageKey = 0;
|
||||
grpInfo.globalIndex = index;
|
||||
grpInfo.lengthFlag = lengthFlag;
|
||||
m_subscribedGroups[dest|FLAG_READ] = grpInfo;
|
||||
globalCnt++;
|
||||
}
|
||||
logOtherInfo("knx", "parsed %d global and %d message assignments", globalCnt, messageCnt);
|
||||
@@ -847,11 +847,11 @@ void KnxHandler::run() {
|
||||
} // else: overwrite "write-read" with readable message
|
||||
logOtherDebug("knx", "replacing write-read association %s to %4.4x", key.c_str(), dest);
|
||||
}
|
||||
m_subscribedGroups[subKey] = {
|
||||
.messageKey = message->getKey(),
|
||||
.fieldIndex = static_cast<uint8_t>(index),
|
||||
.lengthFlag = lengthFlag,
|
||||
};
|
||||
groupInfo_t grpInfo;
|
||||
grpInfo.messageKey = message->getKey();
|
||||
grpInfo.globalIndex = static_cast<global_t>(index);
|
||||
grpInfo.lengthFlag = lengthFlag;
|
||||
m_subscribedGroups[subKey] = grpInfo;
|
||||
m_subscribedMessages[message->getKey()].push_back(subKey);
|
||||
logOtherDebug("knx", "added %s association %s to %4.4x", isWrite ? "write" : "read", key.c_str(), dest);
|
||||
if (isWrite) {
|
||||
@@ -860,11 +860,7 @@ void KnxHandler::run() {
|
||||
subKey = static_cast<uint32_t>(dest | FLAG_READ);
|
||||
sit = m_subscribedGroups.find(subKey);
|
||||
if (sit == m_subscribedGroups.cend()) {
|
||||
m_subscribedGroups[subKey] = {
|
||||
.messageKey = message->getKey(),
|
||||
.fieldIndex = static_cast<uint8_t>(index),
|
||||
.lengthFlag = lengthFlag,
|
||||
};
|
||||
m_subscribedGroups[subKey] = grpInfo;
|
||||
logOtherDebug("knx", "added write-read association %s to %4.4x", key.c_str(), dest);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,8 +94,8 @@ typedef union {
|
||||
uint64_t value;
|
||||
} dtlf_t;
|
||||
|
||||
#define DTLF_1BIT {.length = 0}
|
||||
#define DTLF_8BIT {.length = 1}
|
||||
#define DTLF_1BIT dtlf_t{.length = 0}
|
||||
#define DTLF_8BIT dtlf_t{.length = 1}
|
||||
|
||||
/** type for global values not associated with an ebus message. */
|
||||
enum global_t {
|
||||
|
||||
@@ -152,7 +152,7 @@ SSLSocket* SSLSocket::connect(const string& host, const uint16_t& port, bool htt
|
||||
time_t until = time(nullptr) + (timeout <= 3 ? 3 : timeout); // at least 3 seconds
|
||||
if (!https) {
|
||||
do {
|
||||
bio = BIO_new_connect(hostPort.c_str());
|
||||
bio = BIO_new_connect((char*)hostPort.c_str());
|
||||
if (isError("connect", bio)) {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user