summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2012-07-19 15:27:18 -0700
committerBen Longbons <b.r.longbons@gmail.com>2012-07-19 15:36:10 -0700
commitd9628b27abfb090d854f77073bc9a1870d804164 (patch)
tree185407724c8569d84d49f1c098faf38df0df88e4 /src/map/map.c
parentcf14f8379f9315859d2d829f40c219e04fdd88f5 (diff)
downloadtmwa-d9628b27abfb090d854f77073bc9a1870d804164.tar.gz
tmwa-d9628b27abfb090d854f77073bc9a1870d804164.tar.bz2
tmwa-d9628b27abfb090d854f77073bc9a1870d804164.tar.xz
tmwa-d9628b27abfb090d854f77073bc9a1870d804164.zip
Hopefully make shutdown more clean.
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 4f661af..d840486 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1876,7 +1876,7 @@ static void map_set_logfile (char *filename)
gettimeofday (&tv, NULL);
map_start_logfile (tv.tv_sec);
- atexit (map_close_logfile);
+
MAP_LOG ("log-start v3");
}
@@ -2063,8 +2063,10 @@ static int cleanup_sub (struct block_list *bl, va_list ap)
* map鯖終了時処理
*------------------------------------------
*/
-void do_final (void)
+void term_func (void)
{
+ map_close_logfile ();
+
int map_id, i;
for (map_id = 0; map_id < map_num; map_id++)
@@ -2121,10 +2123,6 @@ int compare_item (struct item *a, struct item *b)
(a->card[2] == b->card[2]) && (a->card[3] == b->card[3]));
}
-// TODO move shutdown stuff here
-void term_func (void)
-{
-}
/*======================================================
* Map-Server Init and Command-line Arguments [Valaris]
*------------------------------------------------------
@@ -2163,8 +2161,6 @@ int do_init (int argc, char *argv[])
script_config_read (SCRIPT_CONF_NAME);
msg_config_read (MSG_CONF_NAME);
- atexit (do_final);
-
id_db = numdb_init ();
map_db = strdb_init (16);
nick_db = strdb_init (24);