From 16d301eb02e84f03df387db15750e4cb52beaf9f Mon Sep 17 00:00:00 2001 From: skotlex Date: Fri, 24 Nov 2006 12:41:38 +0000 Subject: - Added all the missing FIFOHEADs in the login/sql servers (required for TURBO support) - Fixed the fact that the TURBO code breaks when you attempt to handle more than one connection at a time within the same function. However this broke map-server compilation, therefore, don't use TURBO yet! It needs more fixing (and I need more time to fix it) - While at it, cleaned a few packet implementations in the char/login servers which were not only ugly, but had some really stupid flaws within (stuff like escaping a string, and then using the non-escaped variable to insert to SQL? T_T) And will someone explain me why the TXT servers are coded much more cleanly, and without such horribly broken code as I find in the SQL ones? T_T; git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9307 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/login/login.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/login') diff --git a/src/login/login.c b/src/login/login.c index 34f2f401a..4582a9c00 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -3278,6 +3278,7 @@ int parse_login(int fd) { { int GM_value, len; char* server_name; + WFIFOHEAD(fd, 3); memcpy(account.userid,RFIFOP(fd,2),NAME_LENGTH); account.userid[23] = '\0'; remove_control_chars((unsigned char *)account.userid); @@ -3286,7 +3287,7 @@ int parse_login(int fd) { remove_control_chars((unsigned char *)account.passwd); account.passwdenc = 0; server_name = (char*)RFIFOP(fd,60); - server_name[19] = '\0'; + server_name[20] = '\0'; remove_control_chars((unsigned char *)server_name); login_log("Connection request of the char-server '%s' @ %d.%d.%d.%d:%d (ip: %s)" RETCODE, server_name, RFIFOB(fd,54), RFIFOB(fd,55), RFIFOB(fd,56), RFIFOB(fd,57), RFIFOW(fd,58), ip); @@ -3303,7 +3304,6 @@ int parse_login(int fd) { server[account.account_id].maintenance = RFIFOW(fd,82); server[account.account_id].new_ = RFIFOW(fd,84); server_fd[account.account_id] = fd; - WFIFOHEAD(fd, 3); WFIFOW(fd,0) = 0x2711; WFIFOB(fd,2) = 0; WFIFOSET(fd,3); -- cgit v1.2.3-60-g2f50