compile time fixes
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@533 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
caf03e7095
commit
f08f026a6c
@ -1,6 +1,6 @@
|
|||||||
Date Added
|
Date Added
|
||||||
12/09
|
12/09
|
||||||
* char-server -UNTESTED- [Wizputer]
|
* char-server changes -UNTESTED- [Wizputer]
|
||||||
* new method for getting GMs [Wizputer]
|
* new method for getting GMs [Wizputer]
|
||||||
* Added unique key for Char names [Wizputer]
|
* Added unique key for Char names [Wizputer]
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
all: char-server_sql
|
all: char-server_sql
|
||||||
sql: char-server_sql
|
sql: char-server_sql
|
||||||
|
|
||||||
COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o ../common/malloc.o ../common/showmsg.o ../common/utils.o
|
COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o ../common/malloc.o ../common/showmsg.o ../common/utils.o ../common/nullpo.o
|
||||||
COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/db.h ../common/malloc.h ../common/showmsg.h ../common/utils.h
|
COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/db.h ../common/malloc.h ../common/showmsg.h ../common/utils.h ../common/nullpo.h
|
||||||
|
|
||||||
char-server_sql: char.o inter.o int_party.o int_guild.o int_storage.o int_pet.o strlib.o itemdb.o $(COMMON_OBJ)
|
char-server_sql: char.o inter.o int_party.o int_guild.o int_storage.o int_pet.o strlib.o itemdb.o $(COMMON_OBJ)
|
||||||
$(CC) -o ../../$@ $^ $(LIB_S)
|
$(CC) -o ../../$@ $^ $(LIB_S)
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
all: char-server_sql
|
all: char-server_sql
|
||||||
sql: char-server_sql
|
sql: char-server_sql
|
||||||
|
|
||||||
COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o ../common/malloc.o ../common/showmsg.o ../common/utils.o
|
COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o ../common/malloc.o ../common/showmsg.o ../common/utils.o ../common/nullpo.o
|
||||||
COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/db.h ../common/malloc.h ../common/showmsg.h ../common/utils.h
|
COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/db.h ../common/malloc.h ../common/showmsg.h ../common/utils.h ../common/nullpo.h
|
||||||
|
|
||||||
char-server_sql: char.o inter.o int_party.o int_guild.o int_storage.o int_pet.o strlib.o itemdb.o $(COMMON_OBJ)
|
char-server_sql: char.o inter.o int_party.o int_guild.o int_storage.o int_pet.o strlib.o itemdb.o $(COMMON_OBJ)
|
||||||
$(CC) -o ../../$@ $^ $(LIB_S)
|
$(CC) -o ../../$@ $^ $(LIB_S)
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../common/utils.h"
|
#include "../common/utils.h"
|
||||||
|
#include "../common/nullpo.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
@ -238,7 +239,7 @@ void read_gm_accounts(int fd, int len) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
int i=0,account_id=0;
|
int i=0,account_id=0;
|
||||||
unsigned char level*;
|
unsigned char *level;
|
||||||
|
|
||||||
if (gm_db)
|
if (gm_db)
|
||||||
do_final_gmdb();
|
do_final_gmdb();
|
||||||
@ -252,8 +253,8 @@ void read_gm_accounts(int fd, int len) {
|
|||||||
for(i=0;i<GM_num;i++) {
|
for(i=0;i<GM_num;i++) {
|
||||||
level = malloc(sizeof(unsigned char));
|
level = malloc(sizeof(unsigned char));
|
||||||
|
|
||||||
*level = RFIFOB(fd,(10+5*(GM_num-1));
|
*level = RFIFOB(fd,(10+5*(GM_num-1)));
|
||||||
account_id = RFIFOW(fd,(6+5*(GM_num-1))
|
account_id = RFIFOW(fd,(6+5*(GM_num-1)));
|
||||||
|
|
||||||
numdb_insert(gm_db, account_id, level);
|
numdb_insert(gm_db, account_id, level);
|
||||||
|
|
||||||
@ -1235,8 +1236,6 @@ void reply_login_request(int fd, int len) {
|
|||||||
if(!servers_connected)
|
if(!servers_connected)
|
||||||
printf("Awaiting maps from map-server.\n");
|
printf("Awaiting maps from map-server.\n");
|
||||||
|
|
||||||
request_gm_accounts();
|
|
||||||
|
|
||||||
// send USER COUNT PING to login server.
|
// send USER COUNT PING to login server.
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("Add timer: (send_users_tologin)\n");
|
printf("Add timer: (send_users_tologin)\n");
|
||||||
@ -1508,7 +1507,7 @@ void recv_map_names(int fd, int len, unsigned char id) {
|
|||||||
|
|
||||||
memset(server[id].map, 0, sizeof(server[id].map));
|
memset(server[id].map, 0, sizeof(server[id].map));
|
||||||
|
|
||||||
int j = 0;
|
int j = 0,i;
|
||||||
unsigned char buf[16384];
|
unsigned char buf[16384];
|
||||||
int x;
|
int x;
|
||||||
|
|
||||||
@ -1573,6 +1572,8 @@ void auth_request(int fd, int len) {
|
|||||||
if (len < 22)
|
if (len < 22)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
int i;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("(AUTH request) auth_fifo search %d %d %d\n", RFIFOL(fd, 2), RFIFOL(fd, 6), RFIFOL(fd, 10));
|
printf("(AUTH request) auth_fifo search %d %d %d\n", RFIFOL(fd, 2), RFIFOL(fd, 6), RFIFOL(fd, 10));
|
||||||
#endif
|
#endif
|
||||||
@ -1620,9 +1621,9 @@ void auth_request(int fd, int len) {
|
|||||||
RFIFOSKIP(fd,22);
|
RFIFOSKIP(fd,22);
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_map_users(int fd, int len) {
|
void set_map_users(int fd, int len, unsigned char id) {
|
||||||
if (len < 6 || len < RFIFOW(fd,2))
|
if (len < 6 || len < RFIFOW(fd,2))
|
||||||
return 0;
|
return;
|
||||||
|
|
||||||
if (RFIFOW(fd,4) != server[id].users)
|
if (RFIFOW(fd,4) != server[id].users)
|
||||||
printf("map user: %d\n", RFIFOW(fd,4));
|
printf("map user: %d\n", RFIFOW(fd,4));
|
||||||
@ -1636,7 +1637,7 @@ void set_map_users(int fd, int len) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int parse_frommap(int fd) {
|
int parse_frommap(int fd) {
|
||||||
int i = 0, j = 0,len;
|
int i = 0,len;
|
||||||
unsigned char id;
|
unsigned char id;
|
||||||
|
|
||||||
// Sometimes fd=0, and it will cause server crash. Don't know why. :(
|
// Sometimes fd=0, and it will cause server crash. Don't know why. :(
|
||||||
@ -1679,7 +1680,7 @@ int parse_frommap(int fd) {
|
|||||||
case 0x2af7: read_gm_accounts(fd,len); break;
|
case 0x2af7: read_gm_accounts(fd,len); break;
|
||||||
case 0x2afa: recv_map_names(fd,len,id); break;
|
case 0x2afa: recv_map_names(fd,len,id); break;
|
||||||
case 0x2afc: auth_request(fd,len); break;
|
case 0x2afc: auth_request(fd,len); break;
|
||||||
case 0x2aff: set_map_users(fd,len); break;
|
case 0x2aff: set_map_users(fd,len,id); break;
|
||||||
|
|
||||||
// char saving
|
// char saving
|
||||||
case 0x2b01:
|
case 0x2b01:
|
||||||
@ -3094,8 +3095,6 @@ int do_init(int argc, char **argv){
|
|||||||
i = add_timer_interval(gettick() + 1000, map_anti_freeze_system, 0, 0, ANTI_FREEZE_INTERVAL * 1000); // checks every X seconds user specifies
|
i = add_timer_interval(gettick() + 1000, map_anti_freeze_system, 0, 0, ANTI_FREEZE_INTERVAL * 1000); // checks every X seconds user specifies
|
||||||
}
|
}
|
||||||
|
|
||||||
read_gm_account();
|
|
||||||
|
|
||||||
if ( console ) {
|
if ( console ) {
|
||||||
set_defaultconsoleparse(parse_console);
|
set_defaultconsoleparse(parse_console);
|
||||||
start_console();
|
start_console();
|
||||||
|
@ -2,8 +2,8 @@ all: login-server_sql
|
|||||||
sql: login-server_sql
|
sql: login-server_sql
|
||||||
|
|
||||||
shared_libs=all
|
shared_libs=all
|
||||||
COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o ../common/malloc.o ../common/showmsg.o
|
COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o ../common/malloc.o ../common/showmsg.o ../common/nullpo.o
|
||||||
COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/version.h ../common/db.h ../common/malloc.h ../common/showmsg.h
|
COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/version.h ../common/db.h ../common/malloc.h ../common/showmsg.h ../common/nullpo.h
|
||||||
|
|
||||||
login-server_sql: login.o char_int.o login_int.o md5calc.o strlib.o $(COMMON_OBJ)
|
login-server_sql: login.o char_int.o login_int.o md5calc.o strlib.o $(COMMON_OBJ)
|
||||||
$(CC) -o ../../$@ $^ $(LIB_S)
|
$(CC) -o ../../$@ $^ $(LIB_S)
|
||||||
|
@ -2,8 +2,8 @@ all: login-server_sql
|
|||||||
sql: login-server_sql
|
sql: login-server_sql
|
||||||
|
|
||||||
shared_libs=all
|
shared_libs=all
|
||||||
COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o ../common/malloc.o ../common/showmsg.o
|
COMMON_OBJ = ../common/core.o ../common/socket.o ../common/timer.o ../common/db.o ../common/malloc.o ../common/showmsg.o ../common/nullpo.o
|
||||||
COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/version.h ../common/db.h ../common/malloc.h ../common/showmsg.h
|
COMMON_H = ../common/core.h ../common/socket.h ../common/timer.h ../common/mmo.h ../common/version.h ../common/db.h ../common/malloc.h ../common/showmsg.h ../common/nullpo.h
|
||||||
|
|
||||||
login-server_sql: login.o char_int.o login_int.o md5calc.o strlib.o $(COMMON_OBJ)
|
login-server_sql: login.o char_int.o login_int.o md5calc.o strlib.o $(COMMON_OBJ)
|
||||||
$(CC) -o ../../$@ $^ $(LIB_S)
|
$(CC) -o ../../$@ $^ $(LIB_S)
|
||||||
|
@ -118,6 +118,7 @@ struct dbt *online_db;
|
|||||||
|
|
||||||
// GM Database
|
// GM Database
|
||||||
struct dbt *gm_db;
|
struct dbt *gm_db;
|
||||||
|
int lowest_gm_level = 1;
|
||||||
|
|
||||||
//-----------------------------------------------------
|
//-----------------------------------------------------
|
||||||
// Online User Database [Wizputer]
|
// Online User Database [Wizputer]
|
||||||
@ -849,6 +850,9 @@ void sql_config_read(const char *cfgName){ /* Kalaspuff, to get login_db */
|
|||||||
else if (strcmpi(w1, "loginlog_db") == 0) {
|
else if (strcmpi(w1, "loginlog_db") == 0) {
|
||||||
strcpy(loginlog_db, w2);
|
strcpy(loginlog_db, w2);
|
||||||
}
|
}
|
||||||
|
else if(strcmpi(w1,"lowest_gm_level")==0){
|
||||||
|
lowest_gm_level = atoi(w2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
printf("reading SQL configuration done.....\n");
|
printf("reading SQL configuration done.....\n");
|
||||||
@ -964,9 +968,6 @@ int do_init(int argc,char **argv){
|
|||||||
free(online_db);
|
free(online_db);
|
||||||
online_db = numdb_init();
|
online_db = numdb_init();
|
||||||
|
|
||||||
// Read GMs from table
|
|
||||||
read_GMs();
|
|
||||||
|
|
||||||
printf("The login-server is \033[1;32mready\033[0m (Server is listening on the port %d).\n\n", login_port);
|
printf("The login-server is \033[1;32mready\033[0m (Server is listening on the port %d).\n\n", login_port);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "../common/version.h"
|
#include "../common/version.h"
|
||||||
#include "../common/db.h"
|
#include "../common/db.h"
|
||||||
#include "../common/timer.h"
|
#include "../common/timer.h"
|
||||||
|
#include "../common/nullpo.h"
|
||||||
|
|
||||||
#include "strlib.h"
|
#include "strlib.h"
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
all: char-converter
|
all: char-converter
|
||||||
sql: char-converter
|
sql: char-converter
|
||||||
|
|
||||||
COMMON_OBJ = ../../common/core.o ../../common/socket.o ../../common/timer.o ../../common/db.o ../../common/malloc.o ../../common/showmsg.o
|
COMMON_OBJ = ../../common/core.o ../../common/socket.o ../../common/timer.o ../../common/db.o ../../common/malloc.o
|
||||||
|
|
||||||
char-converter: char-converter.o strlib.o $(COMMON_OBJ)
|
char-converter: char-converter.o strlib.o $(COMMON_OBJ)
|
||||||
$(CC) -o ../../../$@ $^ $(LIB_S)
|
$(CC) -o ../../../$@ $^ $(LIB_S)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
all: login-converter
|
all: login-converter
|
||||||
sql: login-converter
|
sql: login-converter
|
||||||
|
|
||||||
COMMON_OBJ = ../../common/core.o ../../common/socket.o ../../common/timer.o ../../common/db.o ../../common/malloc.o ../../common/showmsg.o
|
COMMON_OBJ = ../../common/core.o ../../common/socket.o ../../common/timer.o ../../common/db.o ../../common/malloc.o
|
||||||
COMMON_H = ../../common/core.h ../../common/socket.h ../../common/timer.h ../../common/mmo.h ../../common/version.h ../../common/db.h ../../common/malloc.h
|
COMMON_H = ../../common/core.h ../../common/socket.h ../../common/timer.h ../../common/mmo.h ../../common/version.h ../../common/db.h ../../common/malloc.h
|
||||||
|
|
||||||
login-converter: login-converter.o ../../login_sql/md5calc.o ../../login_sql/strlib.o $(COMMON_OBJ)
|
login-converter: login-converter.o ../../login_sql/md5calc.o ../../login_sql/strlib.o $(COMMON_OBJ)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user