summaryrefslogtreecommitdiff
path: root/src/char/loginif.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-06-18 01:52:38 +0200
committerHaru <haru@dotalux.com>2015-08-13 16:27:31 +0200
commit91ec12528483e4851d0d819cb089fedbdda21826 (patch)
treef34aafd58f0070fe8bbaa56948f3ffb7577098a4 /src/char/loginif.c
parentc116380dee8f0c65fa5d31fbd184c5aa6367ae55 (diff)
downloadhercules-91ec12528483e4851d0d819cb089fedbdda21826.tar.gz
hercules-91ec12528483e4851d0d819cb089fedbdda21826.tar.bz2
hercules-91ec12528483e4851d0d819cb089fedbdda21826.tar.xz
hercules-91ec12528483e4851d0d819cb089fedbdda21826.zip
Cleaned up socket interface
- Replaced some macro calls with the proper interface syntax - Removed useless macros and workarounds API changes summary: - WFIFOSET() can now be safely used both inside and outside socket.c - RFIFOSKIP() can now be safely used both inside and outside socket.c - do_close() is now sockt->close() - flush_fifo() is now sockt->flush() - flush_fifos() is now sockt->flush_fifos() - getips() is now sockt->getips() - host2ip() is now sockt->host2ip() - ip2str() is now sockt->ip2str() - ntows() is now sockt->ntows() - make_connection() is now sockt->make_connection() - make_listen_bind() is now sockt->make_listen_bind() - realloc_fifo() is now sockt->realloc_fifo() - realloc_writefifo() is now sockt->realloc_writefifo() - session_isActive() is now sockt->session_is_active() - session_isValid() is now sockt->session_is_valid() - set_defaultparse() is now sockt->set_defaultparse() - set_eof() is now sockt->eof() - set_noblocking() is now sockt->set_noblocking() - str2ip() is now sockt->str2ip() Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/char/loginif.c')
-rw-r--r--src/char/loginif.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/char/loginif.c b/src/char/loginif.c
index 881c8f2ac..4eac78774 100644
--- a/src/char/loginif.c
+++ b/src/char/loginif.c
@@ -28,7 +28,7 @@ void loginif_reset(void)
// TODO kick everyone out and reset everything or wait for connect and try to reacquire locks [FlavioJS]
for( id = 0; id < ARRAYLENGTH(chr->server); ++id )
mapif->server_reset(id);
- flush_fifos();
+ sockt->flush_fifos();
exit(EXIT_FAILURE);
}
@@ -80,9 +80,8 @@ void do_init_loginif(void)
void do_final_loginif(void)
{
- if( chr->login_fd != -1 )
- {
- do_close(chr->login_fd);
+ if (chr->login_fd != -1) {
+ sockt->close(chr->login_fd);
chr->login_fd = -1;
}
}