summaryrefslogtreecommitdiff
path: root/src/net/ea/network.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-11-03 10:18:25 -0700
committerJared Adams <jaxad0127@gmail.com>2009-11-03 10:18:25 -0700
commitacd557f9472c711fe92b9c158ec336abf688bf7b (patch)
tree2295d13589411ee88afe16f4997bea65b4ebba94 /src/net/ea/network.cpp
parentc60d3a98dbbb20621742bfd82bbaaa6b7085a8ae (diff)
downloadmana-acd557f9472c711fe92b9c158ec336abf688bf7b.tar.gz
mana-acd557f9472c711fe92b9c158ec336abf688bf7b.tar.bz2
mana-acd557f9472c711fe92b9c158ec336abf688bf7b.tar.xz
mana-acd557f9472c711fe92b9c158ec336abf688bf7b.zip
Remove more _SUPPORT ifdefs and do some cleanup
Diffstat (limited to 'src/net/ea/network.cpp')
-rw-r--r--src/net/ea/network.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/net/ea/network.cpp b/src/net/ea/network.cpp
index d8d27577..c12e1bb9 100644
--- a/src/net/ea/network.cpp
+++ b/src/net/ea/network.cpp
@@ -84,6 +84,8 @@ short packet_lengths[] = {
const unsigned int BUFFER_SIZE = 65536;
+namespace EAthena {
+
int networkThread(void *data)
{
Network *network = static_cast<Network*>(data);
@@ -222,9 +224,13 @@ void Network::dispatchMessages()
MessageHandlerIterator iter = mMessageHandlers.find(msg.getId());
if (iter != mMessageHandlers.end())
+ {
iter->second->handleMessage(msg);
+ }
else
+ {
logger->log("Unhandled packet: %x", msg.getId());
+ }
skip(msg.getLength());
}
@@ -317,7 +323,7 @@ MessageIn Network::getNextMessage()
len = readWord(2);
#ifdef DEBUG
- logger->log("Received packet 0x%x of length %d", msgId, len);
+ logger->log("Received packet 0x%x of length %d\n", msgId, len);
#endif
MessageIn msg(mInBuffer, len);
@@ -464,3 +470,5 @@ Uint16 Network::readWord(int pos)
return (*(Uint16*)(mInBuffer+(pos)));
#endif
}
+
+}