From 49e9510c432987393d10ec1b8b1c2d416c9feb42 Mon Sep 17 00:00:00 2001 From: ultramage Date: Wed, 26 Mar 2008 10:37:45 +0000 Subject: Adjusted eAthena code to compile cleanly in C++ mode. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12436 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/login/login.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/login') diff --git a/src/login/login.c b/src/login/login.c index 2931c87cb..7051ffb5e 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -131,7 +131,7 @@ void add_online_user(int char_server, int account_id) struct online_login_data* p; if( !login_config.online_check ) return; - p = idb_ensure(online_db, account_id, create_online_user); + p = (struct online_login_data*)idb_ensure(online_db, account_id, create_online_user); p->char_server = char_server; if( p->waiting_disconnect != -1 ) { @@ -154,7 +154,7 @@ void remove_online_user(int account_id) static int waiting_disconnect_timer(int tid, unsigned int tick, int id, int data) { - struct online_login_data* p = idb_get(online_db, id); + struct online_login_data* p = (struct online_login_data*)idb_get(online_db, id); if( p != NULL && p->waiting_disconnect == id ) { p->waiting_disconnect = -1; @@ -1122,7 +1122,7 @@ int mmo_auth(struct mmo_account* account, int fd) else safestrncpy(user_password, account->passwd, NAME_LENGTH); - if( !check_password(session[fd]->session_data, account->passwdenc, user_password, auth_dat[i].pass) ) + if( !check_password((struct login_session_data*)session[fd]->session_data, account->passwdenc, user_password, auth_dat[i].pass) ) { ShowNotice("Invalid password (account: %s, pass: %s, received pass: %s, ip: %s)\n", account->userid, auth_dat[i].pass, (account->passwdenc) ? "[MD5]" : account->passwd, ip); return 1; // 1 = Incorrect Password @@ -1150,7 +1150,7 @@ int mmo_auth(struct mmo_account* account, int fd) if( login_config.online_check ) { - struct online_login_data* data = idb_get(online_db,auth_dat[i].account_id); + struct online_login_data* data = (struct online_login_data*)idb_get(online_db,auth_dat[i].account_id); if( data ) {// account is already marked as online! if( data->char_server > -1 ) @@ -1456,8 +1456,8 @@ int parse_fromchar(int fd) char actual_email[40]; char new_email[40]; int account_id = RFIFOL(fd,2); - safestrncpy(actual_email, RFIFOP(fd,6), 40); remove_control_chars(actual_email); - safestrncpy(new_email, RFIFOP(fd,46), 40); remove_control_chars(new_email); + safestrncpy(actual_email, (char*)RFIFOP(fd,6), 40); remove_control_chars(actual_email); + safestrncpy(new_email, (char*)RFIFOP(fd,46), 40); remove_control_chars(new_email); RFIFOSKIP(fd, 86); if( e_mail_check(actual_email) == 0 ) @@ -1696,7 +1696,7 @@ int parse_fromchar(int fd) users = RFIFOW(fd,4); for (i = 0; i < users; i++) { aid = RFIFOL(fd,6+i*4); - p = idb_ensure(online_db, aid, create_online_user); + p = (struct online_login_data*)idb_ensure(online_db, aid, create_online_user); p->char_server = id; if (p->waiting_disconnect != -1) { -- cgit v1.2.3-60-g2f50