summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorcodemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-11 03:32:32 +0000
committercodemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-11 03:32:32 +0000
commit2d2b351c74561d820e01cea29d972bc3a8312c1e (patch)
tree6c800744aed42025d91864ff39eb00483a6e9900 /src/map/clif.c
parentb1bdfe1d1d7da8f16991117b9743bce506aea7b5 (diff)
downloadhercules-2d2b351c74561d820e01cea29d972bc3a8312c1e.tar.gz
hercules-2d2b351c74561d820e01cea29d972bc3a8312c1e.tar.bz2
hercules-2d2b351c74561d820e01cea29d972bc3a8312c1e.tar.xz
hercules-2d2b351c74561d820e01cea29d972bc3a8312c1e.zip
* Added a fix to @sound where if you forgot the .wav exention, i'd attempt to play the file without it (it adds the .wav) [Codemaster] [SVN 949]
* Added @disguiseall / @undisguiseall [Codemaster] [SVN 949] * Added misc. clif.c fixes (jAthena added alot of close(fd)'s, so i added them, too) [Codemaster] [SVN 949] * Added bug reports - Celest, you might want to check one of those out [Codemaster] [SVN 949] git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@949 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index ee0d9cf93..f596b3020 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1527,6 +1527,7 @@ static int clif_waitclose(int tid, unsigned int tick, int id, int data) {
if (session[id])
session[id]->eof = 1;
+ close(id);
return 0;
}
@@ -10347,7 +10348,8 @@ static int clif_parse(int fd) {
RFIFOSKIP(fd,2);
break;
case 0x7532: // 接続の切断
- session[fd]->eof = 1;
+ close(fd);
+ session[fd]->eof=1;
break;
}
return 0;
@@ -10416,6 +10418,7 @@ static int clif_parse(int fd) {
cmd >= MAX_PACKET_DB || packet_size_table[packet_ver-5][cmd] == 0) {
if (!fd)
return 0;
+ close(fd);
session[fd]->eof = 1;
printf("clif_parse: session #%d, packet 0x%x (%d bytes received) -> disconnected.\n", fd, cmd, RFIFOREST(fd));
return 0;
@@ -10428,7 +10431,8 @@ static int clif_parse(int fd) {
return 0; // 可変長パケットで長さの所までデータが来てない
packet_len = RFIFOW(fd,2);
if (packet_len < 4 || packet_len > 32768) {
- session[fd]->eof = 1;
+ close(fd);
+ session[fd]->eof =1;
return 0;
}
}