summaryrefslogtreecommitdiff
path: root/src/map/chrif.c
diff options
context:
space:
mode:
author(no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-05 00:00:50 +0000
committer(no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-05 00:00:50 +0000
commit33c37b2ba315af44f1ed17adafc06044059af32f (patch)
treed3e245143e1877e90a25763291e5ac08b5f7f5cd /src/map/chrif.c
parent8d77d2d60af57862d731814b23a81ec868668043 (diff)
downloadhercules-33c37b2ba315af44f1ed17adafc06044059af32f.tar.gz
hercules-33c37b2ba315af44f1ed17adafc06044059af32f.tar.bz2
hercules-33c37b2ba315af44f1ed17adafc06044059af32f.tar.xz
hercules-33c37b2ba315af44f1ed17adafc06044059af32f.zip
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@9 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/chrif.c')
-rw-r--r--src/map/chrif.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 0c456f128..0423d792b 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -885,7 +885,9 @@ int chrif_parse(int fd)
// only char-server can have an access to here.
// so, if it isn't the char-server, we disconnect the session (fd != char_fd).
- if (fd != char_fd || session[fd]->eof) {
+ if(fd != char_fd)
+ session[fd]->eof = 1;
+ if(session[fd]->eof) {
if (fd == char_fd) {
printf("Map-server can't connect to char-server (connection #%d).\n", fd);
char_fd = -1;
@@ -905,6 +907,7 @@ int chrif_parse(int fd)
if (r == 1) continue; // intifで処理した
if (r == 2) return 0; // intifで処理したが、データが足りない
+ close(fd); // intifで処理できなかった
session[fd]->eof = 1;
return 0;
}