summaryrefslogtreecommitdiff
path: root/src/char_sql/char.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-12-17 13:23:34 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-12-17 13:23:34 +0000
commit3a4984a967675b1fd10c84730994bf08766c639d (patch)
tree00be3127a35d41ecbf1cb8f3b56922cd3575f36b /src/char_sql/char.c
parent1110866d367cb7a158e0b4c9dc2a16e15d3ca90d (diff)
downloadhercules-3a4984a967675b1fd10c84730994bf08766c639d.tar.gz
hercules-3a4984a967675b1fd10c84730994bf08766c639d.tar.bz2
hercules-3a4984a967675b1fd10c84730994bf08766c639d.tar.xz
hercules-3a4984a967675b1fd10c84730994bf08766c639d.zip
* Added flag.server to indicate interserver sockets
- replaces the previous way (setting 'client_addr' to 0) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11930 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql/char.c')
-rw-r--r--src/char_sql/char.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index e18475c36..a40d627b8 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -258,7 +258,7 @@ void set_char_online(int map_id, int char_id, int account_id)
cp = idb_get(char_db_,char_id);
inter_guild_CharOnline(char_id, cp?cp->guild_id:-1);
}
- if (login_fd > 0 && !session[login_fd]->eof)
+ if (login_fd > 0 && !session[login_fd]->flag.eof)
{
WFIFOHEAD(login_fd,6);
WFIFOW(login_fd,0) = 0x272b;
@@ -301,7 +301,7 @@ void set_char_offline(int char_id, int account_id)
}
}
- if (login_fd > 0 && !session[login_fd]->eof)
+ if (login_fd > 0 && !session[login_fd]->flag.eof)
{
WFIFOHEAD(login_fd,6);
WFIFOW(login_fd,0) = 0x272c;
@@ -351,7 +351,7 @@ void set_all_offline(int id)
ShowNotice("Sending users of map-server %d offline.\n",id);
online_char_db->foreach(online_char_db,char_db_kickoffline,id);
- if (id >= 0 || login_fd <= 0 || session[login_fd]->eof)
+ if (id >= 0 || login_fd <= 0 || session[login_fd]->flag.eof)
return;
//Tell login-server to also mark all our characters as offline.
WFIFOHEAD(login_fd,2);
@@ -1623,7 +1623,7 @@ int parse_fromlogin(int fd)
if( fd != login_fd )
set_eof(fd);
- if(session[fd]->eof) {
+ if(session[fd]->flag.eof) {
if (fd == login_fd) {
ShowWarning("Connection to login-server lost (connection #%d).\n", fd);
login_fd = -1;
@@ -2126,7 +2126,7 @@ int parse_frommap(int fd)
ARR_FIND( 0, MAX_MAP_SERVERS, id, server[id].fd == fd );
if(id == MAX_MAP_SERVERS)
set_eof(fd);
- if(session[fd]->eof) {
+ if(session[fd]->flag.eof) {
if (id < MAX_MAP_SERVERS) {
unsigned char buf[16384];
ShowStatus("Map-server %d (session #%d) has disconnected.\n", id, fd);
@@ -2801,7 +2801,7 @@ int parse_char(int fd)
if(login_fd < 0)
set_eof(fd);
- if(session[fd]->eof)
+ if(session[fd]->flag.eof)
{
if (sd != NULL)
{ // already authed client
@@ -3189,7 +3189,7 @@ int parse_char(int fd)
server[i].users = 0;
memset(server[i].map, 0, sizeof(server[i].map));
session[fd]->func_parse = parse_frommap;
- session[fd]->client_addr = 0;
+ session[fd]->flag.server = 1;
realloc_fifo(fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
char_mapif_init(fd);
// send gm acccounts level to map-servers
@@ -3398,7 +3398,7 @@ int check_connect_login_server(int tid, unsigned int tick, int id, int data)
return 0;
}
session[login_fd]->func_parse = parse_fromlogin;
- session[login_fd]->client_addr = 0;
+ session[login_fd]->flag.server = 1;
realloc_fifo(login_fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
WFIFOHEAD(login_fd,86);