summaryrefslogtreecommitdiffstats
path: root/src/Net/Connection.cpp
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-06-18 22:03:02 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-06-18 22:03:02 +0200
commit7234fe326d16d6bf9f4374a09ddc6ef790e6723f (patch)
tree437d4c40eeb1e9b34b369e4b82064a1572c7dac9 /src/Net/Connection.cpp
parentbf561f8226e97f4ace4f04bddf198175e91ee7f0 (diff)
downloadmad-7234fe326d16d6bf9f4374a09ddc6ef790e6723f.tar
mad-7234fe326d16d6bf9f4374a09ddc6ef790e6723f.zip
Globale Variablen durch Application-Klasse ersetzt
Diffstat (limited to 'src/Net/Connection.cpp')
-rw-r--r--src/Net/Connection.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Net/Connection.cpp b/src/Net/Connection.cpp
index 81f4c64..fabbd12 100644
--- a/src/Net/Connection.cpp
+++ b/src/Net/Connection.cpp
@@ -19,7 +19,7 @@
#include "Connection.h"
-#include <Core/Logger.h>
+#include <Core/Application.h>
#include <cstring>
#include <boost/bind.hpp>
@@ -35,7 +35,7 @@ Connection::~Connection() {
void Connection::handleHandshake(const boost::system::error_code& error) {
if(error) {
- Core::Logger::logf("Error: %s", error.message().c_str());
+ application->logf("Error: %s", error.message().c_str());
// TODO Error handling
doDisconnect();
@@ -61,7 +61,7 @@ void Connection::handleShutdown(const boost::system::error_code& error) {
boost::lock_guard<boost::shared_mutex> lock(connectionLock);
if(error) {
- Core::Logger::logf(Core::Logger::VERBOSE, "Shutdown error: %s", error.message().c_str());
+ application->logf(Core::LoggerBase::VERBOSE, "Shutdown error: %s", error.message().c_str());
}
_setState(DISCONNECTED);
@@ -110,7 +110,7 @@ void Connection::handleDataReceive(const std::vector<boost::uint8_t> &data) {
void Connection::handleRead(const boost::system::error_code& error, std::size_t bytes_transferred, std::size_t length, const boost::function1<void, const std::vector<boost::uint8_t>& > &notify) {
if(error || (bytes_transferred+received) < length) {
- Core::Logger::logf(Core::Logger::VERBOSE, "Read error: %s", error.message().c_str());
+ application->logf(Core::LoggerBase::VERBOSE, "Read error: %s", error.message().c_str());
// TODO Error
doDisconnect();
@@ -183,7 +183,7 @@ void Connection::handleWrite(const boost::system::error_code& error, std::size_t
}
if(error) {
- Core::Logger::logf(Core::Logger::VERBOSE, "Write error: %s", error.message().c_str());
+ application->logf(Core::LoggerBase::VERBOSE, "Write error: %s", error.message().c_str());
// TODO Error
doDisconnect();