summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-06-15 03:30:27 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-06-15 03:30:27 +0000
commitb984d03a16b5e3aa3b271836b95c21b0a6d92dcc (patch)
tree2d245abbbe507e8135364c6fbecf01ea07ae1eb1 /src/map/clif.c
parent66777e5c665efd42b9328d32fbb3762614d4c90e (diff)
downloadhercules-b984d03a16b5e3aa3b271836b95c21b0a6d92dcc.tar.gz
hercules-b984d03a16b5e3aa3b271836b95c21b0a6d92dcc.tar.bz2
hercules-b984d03a16b5e3aa3b271836b95c21b0a6d92dcc.tar.xz
hercules-b984d03a16b5e3aa3b271836b95c21b0a6d92dcc.zip
Modified unknown packet ver message to provide more data as on what it believes is an invalid packet ver (e.g. useful to know whether its because of an obfuscated packet header etc)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16302 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index e472c343a..a8db3a2b8 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -16113,9 +16113,8 @@ static int clif_parse(int fd)
} else {
// check authentification packet to know packet version
packet_ver = clif_guess_PacketVer(fd, 0, &err);
- if( err )
- {// failed to identify packet version
- ShowInfo("clif_parse: Disconnecting session #%d with unknown packet version%s.\n", fd, (
+ if( err ) {// failed to identify packet version
+ ShowInfo("clif_parse: Disconnecting session #%d with unknown packet version%s (p:0x%04x|l:%d).\n", fd, (
err == 1 ? "" :
err == 2 ? ", possibly for having an invalid account_id" :
err == 3 ? ", possibly for having an invalid char_id." :
@@ -16124,14 +16123,16 @@ static int clif_parse(int fd)
err == 5 ? ", possibly for having an invalid client_tick." :
*/
err == 6 ? ", possibly for having an invalid sex." :
- ". ERROR invalid error code"));
+ ". ERROR invalid error code"), cmd, RFIFOREST(fd));
WFIFOHEAD(fd,packet_len(0x6a));
WFIFOW(fd,0) = 0x6a;
WFIFOB(fd,2) = 3; // Rejected from Server
WFIFOSET(fd,packet_len(0x6a));
+
#ifdef DUMP_INVALID_PACKET
ShowDump(RFIFOP(fd,0), RFIFOREST(fd));
#endif
+
RFIFOSKIP(fd, RFIFOREST(fd));
set_eof(fd);
return 0;