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