summaryrefslogtreecommitdiffstats
path: root/src/dabOutput/dabOutputTcp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dabOutput/dabOutputTcp.cpp')
-rw-r--r--src/dabOutput/dabOutputTcp.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/dabOutput/dabOutputTcp.cpp b/src/dabOutput/dabOutputTcp.cpp
index c59eacb..427018e 100644
--- a/src/dabOutput/dabOutputTcp.cpp
+++ b/src/dabOutput/dabOutputTcp.cpp
@@ -52,13 +52,13 @@ void* tcpThread(void* param)
DabOutputTcp* tcp = (DabOutputTcp*)param;
while ((client = tcp->server->accept()) != NULL) {
- etiLog.print(TcpLog::INFO, "TCP server got a new client.\n");
+ etiLog.log(info, "TCP server got a new client.\n");
if (tcp->client != NULL) {
delete tcp->client;
}
tcp->client = client;
}
- etiLog.print(TcpLog::ERR, "TCP thread can't accept new client (%s)\n",
+ etiLog.log(error, "TCP thread can't accept new client (%s)\n",
inetErrDesc, inetErrMsg);
return NULL;
@@ -72,7 +72,7 @@ int DabOutputTcp::Open(const char* name)
long port;
address = strchr((char*)hostport, ':');
if (address == NULL) {
- etiLog.printHeader(TcpLog::ERR,
+ etiLog.log(error,
"\"%s\" is an invalid format for tcp address: "
"should be [address]:port - > aborting\n",
hostport);
@@ -84,26 +84,26 @@ int DabOutputTcp::Open(const char* name)
port = strtol(address, (char **)NULL, 10);
if ((port == LONG_MIN) || (port == LONG_MAX)) {
- etiLog.printHeader(TcpLog::ERR,
+ etiLog.log(error,
"can't convert port number in tcp address %s\n", address);
goto tcp_open_fail;
}
if (port == 0) {
- etiLog.printHeader(TcpLog::ERR,
+ etiLog.log(error,
"can't use port number 0 in tcp address\n");
goto tcp_open_fail;
}
address = hostport;
if (strlen(address) > 0) {
if (this->server->create(port, address) == -1) {
- etiLog.printHeader(TcpLog::ERR, "Can't create Tcp server on %s:%i "
+ etiLog.log(error, "Can't create Tcp server on %s:%i "
"(%s: %s) -> aborting\n",
address, port, inetErrDesc, inetErrMsg);
goto tcp_open_fail;
}
} else {
if (this->server->create(port) == -1) {
- etiLog.printHeader(TcpLog::ERR, "Can't create Tcp server on :%i "
+ etiLog.log(error, "Can't create Tcp server on :%i "
"(%s: %s) -> aborting\n",
port, inetErrDesc, inetErrMsg);
goto tcp_open_fail;
@@ -114,7 +114,7 @@ int DabOutputTcp::Open(const char* name)
// this->packet_->getAddress().getPort());
if (this->server->listen() == -1) {
- etiLog.printHeader(TcpLog::ERR, "Can't listen on Tcp socket (%s: %s)\n",
+ etiLog.log(error, "Can't listen on Tcp socket (%s: %s)\n",
inetErrDesc, inetErrMsg);
goto tcp_open_fail;
}
@@ -149,7 +149,7 @@ int DabOutputTcp::Write(void* buffer, int size)
}
}
else {
- etiLog.print(TcpLog::INFO, "TCP server client disconnected.\n");
+ etiLog.log(info, "TCP server client disconnected.\n");
delete this->client;
this->client = NULL;
}