diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-04-20 21:57:33 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-04-20 21:57:33 +0000 |
commit | 95acae21f2c3d1f76109f6d9c5a8121f1474a923 (patch) | |
tree | cdb6dc410692d5d299e91f81ca8f289c59725c4c /src/login/login.c | |
parent | 131e693e935468ab8d247c9f4483851b51c25c28 (diff) | |
download | hercules-95acae21f2c3d1f76109f6d9c5a8121f1474a923.tar.gz hercules-95acae21f2c3d1f76109f6d9c5a8121f1474a923.tar.bz2 hercules-95acae21f2c3d1f76109f6d9c5a8121f1474a923.tar.xz hercules-95acae21f2c3d1f76109f6d9c5a8121f1474a923.zip |
- Added ntows() to properly handle that client port number deficiency
- Adjusted the packet_db array for a more consistent look
- Reorganized some entries in packet_db.txt
- Fixed a small scripts_custom.conf typo
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10296 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/login/login.c')
-rw-r--r-- | src/login/login.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/login/login.c b/src/login/login.c index e948264b2..e18396b23 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -3079,8 +3079,8 @@ int parse_login(int fd) if (server_fd[i] >= 0) { // Advanced subnet check [LuzZza] uint32 subnet_char_ip = lan_subnetcheck(ipl); - WFIFOL(fd,47+server_num*32) = (subnet_char_ip) ? htonl(subnet_char_ip) : htonl(server[i].ip); - WFIFOW(fd,47+server_num*32+4) = server[i].port; // /!\ must be sent in intel host byte order /!\ (client bug) + WFIFOL(fd,47+server_num*32) = htonl((subnet_char_ip) ? subnet_char_ip : server[i].ip); + WFIFOW(fd,47+server_num*32+4) = ntows(htons(server[i].port)); // [!] LE byte order here [!] memcpy(WFIFOP(fd,47+server_num*32+6), server[i].name, 20); WFIFOW(fd,47+server_num*32+26) = server[i].users; WFIFOW(fd,47+server_num*32+28) = server[i].maintenance; |