summaryrefslogtreecommitdiff
path: root/src/char/char.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/char/char.c')
-rw-r--r--src/char/char.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 1a2b61389..78f4bd3ae 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -22,6 +22,7 @@
#include "socket.h"
#include "timer.h"
#include "mmo.h"
+#include "db.h"
#include "version.h"
#include "lock.h"
#include "char.h"
@@ -630,11 +631,6 @@ int mmo_char_init(void) {
printf("out of memory: mmo_char_init (calloc of char_dat).\n");
exit(1);
}
- online_chars = (struct online_chars*)aCalloc(sizeof(struct online_chars) * 256, 1);
- if (!online_chars) {
- printf("out of memory: mmo_char_init (calloc of online_chars).\n");
- exit(1);
- }
for(i = 0; i < char_max; i++)
{
online_chars[i].char_id = -1;
@@ -3456,8 +3452,9 @@ void do_final(void) {
delete_session(login_fd);
delete_session(char_fd);
- for(i = 0; i < fd_max; i++)
- if(session[i] != NULL) aFree(session[i]);
+ inter_final();
+ exit_dbn();
+ timer_final();
char_log("----End of char-server (normal end with closing of all files)." RETCODE);
}
@@ -3512,7 +3509,6 @@ int do_init(int argc, char **argv) {
online_chars[i].server = -1;
}
-
mmo_char_init();
update_online = time(NULL);