fix previous commit
This commit is contained in:
@@ -1179,8 +1179,8 @@ bool BusHandler::addSeenAddress(symbol_t address) {
|
|||||||
void BusHandler::messageCompleted() {
|
void BusHandler::messageCompleted() {
|
||||||
const char* prefix = m_currentRequest ? "sent" : "received";
|
const char* prefix = m_currentRequest ? "sent" : "received";
|
||||||
// do an explicit copy here in case being called by another thread
|
// do an explicit copy here in case being called by another thread
|
||||||
const MasterSymbolString command = m_currentRequest ? m_currentRequest->m_master : m_command;
|
const MasterSymbolString command(m_currentRequest ? m_currentRequest->m_master : m_command);
|
||||||
SlaveSymbolString response = m_response;
|
const SlaveSymbolString response(m_response);
|
||||||
symbol_t srcAddress = command[0], dstAddress = command[1];
|
symbol_t srcAddress = command[0], dstAddress = command[1];
|
||||||
if (srcAddress == dstAddress) {
|
if (srcAddress == dstAddress) {
|
||||||
logError(lf_bus, "invalid self-addressed message from %2.2x", srcAddress);
|
logError(lf_bus, "invalid self-addressed message from %2.2x", srcAddress);
|
||||||
|
|||||||
+12
-14
@@ -370,6 +370,12 @@ class MasterSymbolString : public SymbolString {
|
|||||||
*/
|
*/
|
||||||
MasterSymbolString() : SymbolString(true) {}
|
MasterSymbolString() : SymbolString(true) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copy constructor.
|
||||||
|
* @param str the @a MasterSymbolString to copy from.
|
||||||
|
*/
|
||||||
|
MasterSymbolString(const MasterSymbolString& str) : SymbolString(str) {}
|
||||||
|
|
||||||
MasterSymbolString& operator=(const MasterSymbolString& other) {
|
MasterSymbolString& operator=(const MasterSymbolString& other) {
|
||||||
this->m_data = other.m_data;
|
this->m_data = other.m_data;
|
||||||
this->m_isMaster = true;
|
this->m_isMaster = true;
|
||||||
@@ -381,13 +387,6 @@ class MasterSymbolString : public SymbolString {
|
|||||||
this->m_isMaster = true;
|
this->m_isMaster = true;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
/**
|
|
||||||
* Copy constructor.
|
|
||||||
* @param str the @a MasterSymbolString to copy from.
|
|
||||||
*/
|
|
||||||
MasterSymbolString(const MasterSymbolString& str) : SymbolString(str) {}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -401,6 +400,12 @@ class SlaveSymbolString : public SymbolString {
|
|||||||
*/
|
*/
|
||||||
SlaveSymbolString() : SymbolString(false) {}
|
SlaveSymbolString() : SymbolString(false) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copy constructor.
|
||||||
|
* @param str the @a SlaveSymbolString to copy from.
|
||||||
|
*/
|
||||||
|
SlaveSymbolString(const SlaveSymbolString& str) : SymbolString(str) {}
|
||||||
|
|
||||||
SlaveSymbolString& operator=(const SlaveSymbolString& other) {
|
SlaveSymbolString& operator=(const SlaveSymbolString& other) {
|
||||||
this->m_data = other.m_data;
|
this->m_data = other.m_data;
|
||||||
this->m_isMaster = false;
|
this->m_isMaster = false;
|
||||||
@@ -412,13 +417,6 @@ class SlaveSymbolString : public SymbolString {
|
|||||||
this->m_isMaster = false;
|
this->m_isMaster = false;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
/**
|
|
||||||
* Copy constructor.
|
|
||||||
* @param str the @a SlaveSymbolString to copy from.
|
|
||||||
*/
|
|
||||||
SlaveSymbolString(const SlaveSymbolString& str) : SymbolString(str) {}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user