summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-29 20:54:55 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-29 20:54:55 +0000
commitb6f7909401cb3d5bd9a79bbec03a89527efc9029 (patch)
treecffce3bdb90306fc5fcdf82f44b42f2155e5ecec /src/map/clif.c
parentc2e9dc776639a58be9c073e4deeabb231d326297 (diff)
downloadhercules-b6f7909401cb3d5bd9a79bbec03a89527efc9029.tar.gz
hercules-b6f7909401cb3d5bd9a79bbec03a89527efc9029.tar.bz2
hercules-b6f7909401cb3d5bd9a79bbec03a89527efc9029.tar.xz
hercules-b6f7909401cb3d5bd9a79bbec03a89527efc9029.zip
- Added a missing map_quit in clif_parse which was the real reason for the crashes.
- Therefore, removed the session valid checks from intif.c - Thanks for Flavio for figuring out how to reproduce the crash. And unthanks to me for introducing it on the first place D: - Note: Every connection before being closed and free'd will set eof to 1 and invoke the parse function (clif_parse for players), and since this is the last invocation, it is clif_parse's job to do any cleanup necessary. The missing map_quit what did was to leave the player pointer reference in different db's, which lead to a dangling pointer! Which obviously leads to no good. The map server's code should always ensure that session[sd->fd]->session_data == sd ALL the time (except when sd->fd is 0). - Finally, not writing any of this on the txt changelog file so Flavio can have the glory of the bugfix :B git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9368 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index ee64a802e..c2f91478f 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -11826,13 +11826,14 @@ int clif_parse(int fd) {
(pc_isGM(sd))?"GM ":"",sd->status.name);
} else
if (sd->state.auth) {
- clif_quitsave(fd, sd); // the function doesn't send to inter-server/char-server if it is not connected [Yor]
// Player logout display [Valaris]
ShowInfo("%sCharacter '"CL_WHITE"%s"CL_RESET"' logged off.\n",
(pc_isGM(sd))?"GM ":"",sd->status.name);
+ clif_quitsave(fd, sd);
} else {
ShowInfo("Player AID:%d/CID:%d (not authenticated) logged off.\n",
sd->bl.id, sd->char_id);
+ map_quit(sd);
}
} else {
unsigned char *ip = (unsigned char *) &session[fd]->client_addr.sin_addr;