From 7a43f6be09cfe74dc4a757e949ba88ce033ac419 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Tue, 25 Sep 2012 08:23:19 +0000 Subject: Sockets are now owned by SocketThreads instead of ClientHandle (FS #246 and FS #247) git-svn-id: http://mc-server.googlecode.com/svn/trunk@891 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Protocol/Protocol.h | 1 + source/Protocol/Protocol132.cpp | 2 ++ source/Protocol/Protocol132.h | 2 -- source/Protocol/ProtocolRecognizer.cpp | 8 ++++++++ source/Protocol/ProtocolRecognizer.h | 1 + 5 files changed, 12 insertions(+), 2 deletions(-) (limited to 'source/Protocol') diff --git a/source/Protocol/Protocol.h b/source/Protocol/Protocol.h index af915a2bb..e871e958a 100644 --- a/source/Protocol/Protocol.h +++ b/source/Protocol/Protocol.h @@ -37,6 +37,7 @@ public: m_Client(a_Client) { } + virtual ~cProtocol() {} /// Called when client sends some data virtual void DataReceived(const char * a_Data, int a_Size) = 0; diff --git a/source/Protocol/Protocol132.cpp b/source/Protocol/Protocol132.cpp index 32b55e280..a39697526 100644 --- a/source/Protocol/Protocol132.cpp +++ b/source/Protocol/Protocol132.cpp @@ -150,6 +150,7 @@ cProtocol132::cProtocol132(cClientHandle * a_Client) : super(a_Client), m_IsEncrypted(false) { + LOGD("Created cProtocol132 at %p", this); } @@ -162,6 +163,7 @@ cProtocol132::~cProtocol132() { LOGD("There are %d unsent bytes while deleting cProtocol132", m_DataToSend.size()); } + LOGD("Deleted cProtocol132 at %p", this); } diff --git a/source/Protocol/Protocol132.h b/source/Protocol/Protocol132.h index dde34ca30..5fb82148d 100644 --- a/source/Protocol/Protocol132.h +++ b/source/Protocol/Protocol132.h @@ -24,8 +24,6 @@ class cProtocol132 : public: cProtocol132(cClientHandle * a_Client); - - // DEBUG: virtual ~cProtocol132(); /// Called when client sends some data: diff --git a/source/Protocol/ProtocolRecognizer.cpp b/source/Protocol/ProtocolRecognizer.cpp index 095d63f8f..96a831063 100644 --- a/source/Protocol/ProtocolRecognizer.cpp +++ b/source/Protocol/ProtocolRecognizer.cpp @@ -29,6 +29,14 @@ cProtocolRecognizer::cProtocolRecognizer(cClientHandle * a_Client) : +cProtocolRecognizer::~cProtocolRecognizer() +{ +} + + + + + void cProtocolRecognizer::DataReceived(const char * a_Data, int a_Size) { if (m_Protocol == NULL) diff --git a/source/Protocol/ProtocolRecognizer.h b/source/Protocol/ProtocolRecognizer.h index 3eff8d2ab..0a42c279f 100644 --- a/source/Protocol/ProtocolRecognizer.h +++ b/source/Protocol/ProtocolRecognizer.h @@ -32,6 +32,7 @@ class cProtocolRecognizer : public: cProtocolRecognizer(cClientHandle * a_Client); + virtual ~cProtocolRecognizer(); /// Called when client sends some data: virtual void DataReceived(const char * a_Data, int a_Size) override; -- cgit v1.2.3