some cosmetics.
This commit is contained in:
+1
-1
@@ -91,7 +91,7 @@ std::string BaseLoop::decodeMessage(const std::string& data)
|
|||||||
ebusCommand += m_commands->getEbusCommand(index);
|
ebusCommand += m_commands->getEbusCommand(index);
|
||||||
std::transform(ebusCommand.begin(), ebusCommand.end(), ebusCommand.begin(), tolower);
|
std::transform(ebusCommand.begin(), ebusCommand.end(), ebusCommand.begin(), tolower);
|
||||||
|
|
||||||
L.log(bas, event, " type: %s msg: %s", type.c_str(), ebusCommand.c_str());
|
L.log(bas, trace, " type: %s msg: %s", type.c_str(), ebusCommand.c_str());
|
||||||
// send busCommand
|
// send busCommand
|
||||||
m_ebusloop->addBusCommand(new BusCommand(type, ebusCommand));
|
m_ebusloop->addBusCommand(new BusCommand(type, ebusCommand));
|
||||||
BusCommand* busCommand = m_ebusloop->getBusCommand();
|
BusCommand* busCommand = m_ebusloop->getBusCommand();
|
||||||
|
|||||||
+5
-2
@@ -72,13 +72,16 @@ void* EBusLoop::run()
|
|||||||
// add new bus command to send
|
// add new bus command to send
|
||||||
if (busResult == 4 && busCommandActive == false && m_sendBuffer.size() != 0) {
|
if (busResult == 4 && busCommandActive == false && m_sendBuffer.size() != 0) {
|
||||||
BusCommand* busCommand = m_sendBuffer.remove();
|
BusCommand* busCommand = m_sendBuffer.remove();
|
||||||
|
L.log(bus, debug, " type: %s msg: %s",
|
||||||
|
busCommand->getType().c_str(), busCommand->getCommand().c_str());
|
||||||
m_bus->addCommand(busCommand);
|
m_bus->addCommand(busCommand);
|
||||||
|
L.log(bus, debug, " addCommand success");
|
||||||
busCommandActive = true;
|
busCommandActive = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// send bus command
|
// send bus command
|
||||||
if (busResult == 1 && busCommandActive == true) {
|
if (busResult == 1 && busCommandActive == true) {
|
||||||
L.log(bus, event, " getBus success");
|
L.log(bus, trace, " getBus success");
|
||||||
m_bus->sendCommand();
|
m_bus->sendCommand();
|
||||||
BusCommand* busCommand = m_bus->recvCommand();
|
BusCommand* busCommand = m_bus->recvCommand();
|
||||||
L.log(bus, trace, " %s", busCommand->getResult().c_str());
|
L.log(bus, trace, " %s", busCommand->getResult().c_str());
|
||||||
@@ -87,7 +90,7 @@ void* EBusLoop::run()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (busResult == 0)
|
if (busResult == 0)
|
||||||
L.log(bus, event, " getBus failure");
|
L.log(bus, trace, " getBus failure");
|
||||||
|
|
||||||
if (busResult == -1)
|
if (busResult == -1)
|
||||||
L.log(bus, event, " getBus error");
|
L.log(bus, event, " getBus error");
|
||||||
|
|||||||
+2
-2
@@ -108,7 +108,7 @@ void* Connection::run()
|
|||||||
|
|
||||||
delete m_socket;
|
delete m_socket;
|
||||||
m_running = false;
|
m_running = false;
|
||||||
L.log(net, event, "[%08x] connection closed - active connections: %d", getID(), m_count);
|
L.log(net, trace, "[%08x] connection closed - active connections: %d", getID(), m_count);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -197,7 +197,7 @@ void* Network::run()
|
|||||||
|
|
||||||
connection->start("netConnection");
|
connection->start("netConnection");
|
||||||
m_connections.push_back(connection);
|
m_connections.push_back(connection);
|
||||||
L.log(net, event, "[%08x] connection opened %s", connection->getID(), socket->getIP().c_str());
|
L.log(net, trace, "[%08x] connection opened %s", connection->getID(), socket->getIP().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user