From a5c454d6dc61b8ee7064b795ed2cbbdf2ab115c6 Mon Sep 17 00:00:00 2001 From: "False.Genesis" Date: Fri, 5 Jan 2007 23:53:53 +0000 Subject: [PATCH] etc --- src/Client/Realm/RealmSocket.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Client/Realm/RealmSocket.cpp b/src/Client/Realm/RealmSocket.cpp index 7270122..c64ff9e 100644 --- a/src/Client/Realm/RealmSocket.cpp +++ b/src/Client/Realm/RealmSocket.cpp @@ -120,7 +120,7 @@ void RealmSocket::Start(void) void RealmSocket::Stop(void) { _valid=false; - this->Close(); + this->SetCloseAndDelete(); memset(_m2,0,20); _key=0; } @@ -180,20 +180,25 @@ void RealmSocket::_HandleRealmList(void) void RealmSocket::OnRead(void) { TcpSocket::OnRead(); + bool known=false; printf("RealmSocket::OnRead() %u bytes\n",ibuf.GetLength()); if(!ibuf.GetLength()) return; uint8 cmd, i=0; ibuf.SoftRead((char*)&cmd, 1); - while(table[i].handler!=NULL) + for(uint8 i=0;table[i].handler!=NULL;i++) { if(table[i].cmd==cmd) { (*this.*table[i].handler)(); + known=true; break; } } - // unk packet + if(!known) + { + printf("RealmSocket: Got unknown packet, cmd=%u\n",cmd); + } } /*