summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/char/char.c6
-rw-r--r--src/char_sql/char.c6
-rw-r--r--src/common/plugins.c2
-rw-r--r--src/common/socket.h1
-rw-r--r--src/login_sql/login.c5
-rw-r--r--src/map/chrif.c3
6 files changed, 14 insertions, 9 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 22dd81d94..54fa75c68 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -4278,8 +4278,10 @@ void do_final(void) {
if(gm_account) aFree(gm_account);
if(char_dat) aFree(char_dat);
- delete_session(login_fd);
- delete_session(char_fd);
+ if (login_fd > 0)
+ do_close(login_fd);
+ if (char_fd > 0)
+ do_close(char_fd);
#ifdef ENABLE_SC_SAVING
status_final();
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index a301bb46f..f93db50af 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -3888,8 +3888,10 @@ void do_final(void) {
gm_account = 0;
}
- delete_session(login_fd);
- delete_session(char_fd);
+ if (login_fd > 0)
+ do_close(login_fd);
+ if (char_fd > 0)
+ do_close(char_fd);
char_db_->destroy(char_db_, NULL);
online_char_db->destroy(online_char_db, NULL);
diff --git a/src/common/plugins.c b/src/common/plugins.c
index 2fa151a49..98e859666 100644
--- a/src/common/plugins.c
+++ b/src/common/plugins.c
@@ -339,7 +339,7 @@ void plugins_init(void)
// networking
export_symbol(RFIFOSKIP, SYMBOL_RFIFOSKIP);
export_symbol(WFIFOSET, SYMBOL_WFIFOSET);
- export_symbol(delete_session, SYMBOL_DELETE_SESSION);
+ export_symbol(do_close, SYMBOL_DELETE_SESSION);
export_symbol(session, SYMBOL_SESSION);
export_symbol(&fd_max, SYMBOL_FD_MAX);
export_symbol(addr_, SYMBOL_ADDR);
diff --git a/src/common/socket.h b/src/common/socket.h
index ac1f71568..fd8165cba 100644
--- a/src/common/socket.h
+++ b/src/common/socket.h
@@ -108,7 +108,6 @@ extern int session_isActive(int fd);
int make_listen_bind(long,int);
int make_connection(long,int);
-int delete_session(int fd);
int realloc_fifo(int fd,unsigned int rfifo_size,unsigned int wfifo_size);
int realloc_writefifo(int fd, size_t addition);
int WFIFOSET(int fd,int len);
diff --git a/src/login_sql/login.c b/src/login_sql/login.c
index 394586f4f..8898bfa2a 100644
--- a/src/login_sql/login.c
+++ b/src/login_sql/login.c
@@ -474,12 +474,13 @@ void mmo_db_close(void) {
ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmpsql);
}
- delete_session(fd);
+ do_close(fd);
}
}
mysql_close(&mysql_handle);
ShowStatus("close DB connect....\n");
- delete_session(login_fd);
+ if (login_fd > 0)
+ do_close(login_fd);
}
//-----------------------------------------------------
diff --git a/src/map/chrif.c b/src/map/chrif.c
index f3cf7b7b2..6a90b14ea 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -1627,7 +1627,8 @@ int auth_db_final(DBKey k,void *d,va_list ap) {
*/
int do_final_chrif(void)
{
- delete_session(char_fd);
+ if (char_fd > 0)
+ do_close(char_fd);
auth_db->destroy(auth_db, auth_db_final);
return 0;
}