diff options
author | (no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-04 23:59:57 +0000 |
---|---|---|
committer | (no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-04 23:59:57 +0000 |
commit | 9229267e6bafa6c502b28eb9ba221c7f33e29a48 (patch) | |
tree | 2f5d1e58ec8fd5e99a9c2eaec597bcfe924396c0 /src/char_sql/char.c | |
parent | 007d2bcbb1bfac12f2737f05837fc1a5ce68151a (diff) | |
download | hercules-9229267e6bafa6c502b28eb9ba221c7f33e29a48.tar.gz hercules-9229267e6bafa6c502b28eb9ba221c7f33e29a48.tar.bz2 hercules-9229267e6bafa6c502b28eb9ba221c7f33e29a48.tar.xz hercules-9229267e6bafa6c502b28eb9ba221c7f33e29a48.zip |
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@6 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql/char.c')
-rw-r--r-- | src/char_sql/char.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c index a96bb59fa..09a8c0f23 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -1175,7 +1175,9 @@ int parse_tologin(int fd) { // only login-server can have an access to here.
// so, if it isn't the login-server, we disconnect the session.
//session eof check!
- if (fd != login_fd || session[fd]->eof) {
+ if(fd != login_fd)
+ session[fd]->eof = 1;
+ if(session[fd]->eof) {
if (fd == login_fd) {
printf("Char-server can't connect to login-server (connection #%d).\n", fd);
login_fd = -1;
@@ -1459,7 +1461,9 @@ int parse_frommap(int fd) { for(id = 0; id < MAX_MAP_SERVERS; id++)
if (server_fd[id] == fd)
break;
- if(id == MAX_MAP_SERVERS || session[fd]->eof) {
+ if(id == MAX_MAP_SERVERS)
+ session[fd]->eof = 1;
+ if(session[fd]->eof) {
if (id < MAX_MAP_SERVERS) {
memset(&server[id], 0, sizeof(struct mmo_map_server));
printf("Map-server %d (session #%d) has disconnected.\n", id, fd);
@@ -1976,7 +1980,9 @@ int parse_char(int fd) { struct char_session_data *sd;
unsigned char *p = (unsigned char *) &session[fd]->client_addr.sin_addr;
- if(login_fd < 0 || session[fd]->eof) {
+ if(login_fd < 0)
+ session[fd]->eof = 1;
+ if(session[fd]->eof) {
if (fd == login_fd)
login_fd = -1;
close(fd);
|