Initailise the logging corrcectly.
This commit is contained in:
parent
1de29551c2
commit
d3a84ee707
|
@ -19,6 +19,7 @@
|
||||||
#include "RemoteCommand.h"
|
#include "RemoteCommand.h"
|
||||||
|
|
||||||
#include "UDPSocket.h"
|
#include "UDPSocket.h"
|
||||||
|
#include "Log.h"
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
|
@ -45,10 +46,12 @@ int main(int argc, char** argv)
|
||||||
CRemoteCommand::CRemoteCommand(unsigned int port) :
|
CRemoteCommand::CRemoteCommand(unsigned int port) :
|
||||||
m_port(port)
|
m_port(port)
|
||||||
{
|
{
|
||||||
|
::LogInitialise(".", "RemoteCommand", 2U, 2U);
|
||||||
}
|
}
|
||||||
|
|
||||||
CRemoteCommand::~CRemoteCommand()
|
CRemoteCommand::~CRemoteCommand()
|
||||||
{
|
{
|
||||||
|
::LogFinalise();
|
||||||
}
|
}
|
||||||
|
|
||||||
int CRemoteCommand::send(const std::string& command)
|
int CRemoteCommand::send(const std::string& command)
|
||||||
|
@ -61,7 +64,7 @@ int CRemoteCommand::send(const std::string& command)
|
||||||
|
|
||||||
in_addr address = CUDPSocket::lookup("localhost");
|
in_addr address = CUDPSocket::lookup("localhost");
|
||||||
|
|
||||||
ret = socket.write((const unsigned char* )command.c_str(), command.length(), address, m_port);
|
ret = socket.write((unsigned char* )command.c_str(), command.length(), address, m_port);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
socket.close();
|
socket.close();
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in a new issue