summaryrefslogtreecommitdiff
path: root/src/net/eathena/mailrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-10 16:36:52 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-10 16:36:52 +0300
commitb3f38fd1cac82b68fb057db5cf6c6e80e0cdfd90 (patch)
tree07a2236398d464bc81ed38beb2e1b675a92fcdf6 /src/net/eathena/mailrecv.cpp
parent3131f766339fa58875bce8257f6127136c217a30 (diff)
downloadplus-b3f38fd1cac82b68fb057db5cf6c6e80e0cdfd90.tar.gz
plus-b3f38fd1cac82b68fb057db5cf6c6e80e0cdfd90.tar.bz2
plus-b3f38fd1cac82b68fb057db5cf6c6e80e0cdfd90.tar.xz
plus-b3f38fd1cac82b68fb057db5cf6c6e80e0cdfd90.zip
For unknown packet field values show packet id and field value.
Diffstat (limited to 'src/net/eathena/mailrecv.cpp')
-rw-r--r--src/net/eathena/mailrecv.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/net/eathena/mailrecv.cpp b/src/net/eathena/mailrecv.cpp
index e89c730e9..4450be2af 100644
--- a/src/net/eathena/mailrecv.cpp
+++ b/src/net/eathena/mailrecv.cpp
@@ -62,7 +62,7 @@ void MailRecv::processMailOpen(Net::MessageIn &msg)
break;
default:
- UNIMPLIMENTEDPACKET;
+ UNIMPLIMENTEDPACKETFIELD(flag);
break;
}
}
@@ -115,7 +115,8 @@ void MailRecv::processReadMail(Net::MessageIn &msg)
void MailRecv::processGetAttachment(Net::MessageIn &msg)
{
- switch (msg.readUInt8("flag"))
+ const uint8_t flag = msg.readUInt8("flag");
+ switch (flag)
{
case 0:
NotifyManager::notify(NotifyTypes::MAIL_GET_ATTACH_OK);
@@ -127,14 +128,15 @@ void MailRecv::processGetAttachment(Net::MessageIn &msg)
NotifyManager::notify(NotifyTypes::MAIL_GET_ATTACH_TOO_MANY_ITEMS);
break;
default:
- UNIMPLIMENTEDPACKET;
+ UNIMPLIMENTEDPACKETFIELD(flag);
break;
}
}
void MailRecv::processSendMailAck(Net::MessageIn &msg)
{
- switch (msg.readUInt8("fail flag"))
+ const uint8_t flag = msg.readUInt8("fail flag");
+ switch (flag)
{
case 0:
NotifyManager::notify(NotifyTypes::MAIL_SEND_OK);
@@ -143,7 +145,7 @@ void MailRecv::processSendMailAck(Net::MessageIn &msg)
NotifyManager::notify(NotifyTypes::MAIL_SEND_ERROR);
break;
default:
- UNIMPLIMENTEDPACKET;
+ UNIMPLIMENTEDPACKETFIELD(flag);
break;
}
}