summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
Diffstat (limited to 'src/login')
-rw-r--r--src/login/HPMlogin.c1
-rw-r--r--src/login/lclif.c4
-rw-r--r--src/login/lclif.p.h4
-rw-r--r--src/login/login.c2
4 files changed, 7 insertions, 4 deletions
diff --git a/src/login/HPMlogin.c b/src/login/HPMlogin.c
index c13bd96a3..e5dc126eb 100644
--- a/src/login/HPMlogin.c
+++ b/src/login/HPMlogin.c
@@ -41,6 +41,7 @@
#include "common/memmgr.h"
#include "common/mutex.h"
#include "common/mmo.h"
+#include "common/packets.h"
#include "common/nullpo.h"
#include "common/random.h"
#include "common/showmsg.h"
diff --git a/src/login/lclif.c b/src/login/lclif.c
index 48a9c6b94..1cb8bfdbd 100644
--- a/src/login/lclif.c
+++ b/src/login/lclif.c
@@ -479,7 +479,7 @@ static const struct login_packet_db *lclif_packet(int16 packet_id)
if (packet_id == PACKET_ID_CA_CHARSERVERCONNECT)
return &lclif->p->dbs->packet_db[0];
- if (packet_id > MAX_PACKET_DB || packet_id < MIN_PACKET_DB)
+ if (packet_id > MAX_PACKET_LOGIN_DB || packet_id < MIN_PACKET_DB)
return NULL;
return &lclif->p->dbs->packet_db[packet_id];
@@ -525,7 +525,7 @@ static void packetdb_loaddb(void)
for (i = 0; i < length; ++i) {
int16 packet_id = packet[i].packet_id;
- Assert_retb(packet_id >= MIN_PACKET_DB && packet_id <= MAX_PACKET_DB);
+ Assert_retb(packet_id >= MIN_PACKET_DB && packet_id <= MAX_PACKET_LOGIN_DB);
lclif->p->dbs->packet_db[packet_id].len = packet[i].packet_len;
lclif->p->dbs->packet_db[packet_id].pFunc = packet[i].pFunc;
}
diff --git a/src/login/lclif.p.h b/src/login/lclif.p.h
index 7fa8475f4..a80caafa2 100644
--- a/src/login/lclif.p.h
+++ b/src/login/lclif.p.h
@@ -35,7 +35,7 @@
// Packet DB
#define MIN_PACKET_DB 0x0064
-#define MAX_PACKET_DB 0x0acf
+#define MAX_PACKET_LOGIN_DB 0x0acf
/* Enums */
@@ -309,7 +309,7 @@ struct packet_AC_ACK_HASH {
* Login Client Interface additional data
*/
struct lclif_interface_dbs {
- struct login_packet_db packet_db[MAX_PACKET_DB + 1]; ///< Packet database.
+ struct login_packet_db packet_db[MAX_PACKET_LOGIN_DB + 1]; ///< Packet database.
};
/**
diff --git a/src/login/login.c b/src/login/login.c
index d54348834..c1844cb25 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -1457,6 +1457,7 @@ static void login_parse_request_connection(int fd, struct login_session_data* sd
sockt->session[fd]->func_parse = login->parse_fromchar;
sockt->session[fd]->flag.server = 1;
+ sockt->session[fd]->flag.validate = 0;
sockt->realloc_fifo(fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
// send connection success
@@ -2175,6 +2176,7 @@ int do_init(int argc, char **argv)
// set default parser as lclif->parse function
sockt->set_defaultparse(lclif->parse);
+ sockt->validate = true;
// every 10 minutes cleanup online account db.
timer->add_func_list(login->online_data_cleanup, "login->online_data_cleanup");