summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-17 17:07:52 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-17 17:07:52 +0300
commit71e2739be2e5d44ef8e7899c7e6beb274b7b517d (patch)
treec20adc1584d001b6831af9c614ab797ce0094b36 /src
parentaa9464281141d0fe098285e0a32ca33d852c0552 (diff)
downloadevol-hercules-71e2739be2e5d44ef8e7899c7e6beb274b7b517d.tar.gz
evol-hercules-71e2739be2e5d44ef8e7899c7e6beb274b7b517d.tar.bz2
evol-hercules-71e2739be2e5d44ef8e7899c7e6beb274b7b517d.tar.xz
evol-hercules-71e2739be2e5d44ef8e7899c7e6beb274b7b517d.zip
Use all common interface initialisation in all servers.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am8
-rw-r--r--src/char/init.c4
-rw-r--r--src/login/init.c5
3 files changed, 11 insertions, 6 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 59554ca..51ef27a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,8 @@
AUTOMAKE_OPTIONS = subdir-objects
-CHAR_SRC = char/init.c
+CHAR_SRC = char/init.c \
+ common/interfaces.c \
+ common/interfaces.h
LOGIN_SRC = login/config.c \
login/config.h \
@@ -8,7 +10,9 @@ LOGIN_SRC = login/config.c \
login/parse.c \
login/parse.h \
login/send.c \
- login/send.h
+ login/send.h \
+ common/interfaces.c \
+ common/interfaces.h
MAP_SRC = map/dummy.c \
map/dummy.h \
diff --git a/src/char/init.c b/src/char/init.c
index 5482afc..6734d45 100644
--- a/src/char/init.c
+++ b/src/char/init.c
@@ -11,6 +11,8 @@
#include "../../../common/socket.h"
#include "../../../common/strlib.h"
+#include "common/interfaces.h"
+
#include "../../../common/HPMDataCheck.h" /* should always be the last file included! (if you don't make it last, it'll intentionally break compile time) */
HPExport struct hplugin_info pinfo =
@@ -23,7 +25,7 @@ HPExport struct hplugin_info pinfo =
HPExport void plugin_init (void)
{
- iMalloc = GET_SYMBOL("iMalloc");
+ interfaces_init_common();
}
HPExport void server_preinit (void)
diff --git a/src/login/init.c b/src/login/init.c
index 6eff178..30cce3a 100644
--- a/src/login/init.c
+++ b/src/login/init.c
@@ -12,6 +12,7 @@
#include "../../../common/strlib.h"
#include "../../../login/login.h"
+#include "common/interfaces.h"
#include "login/config.h"
#include "login/parse.h"
@@ -27,9 +28,7 @@ HPExport struct hplugin_info pinfo =
HPExport void plugin_init (void)
{
- session = GET_SYMBOL("session");
- sockt = GET_SYMBOL("sockt");
- strlib = GET_SYMBOL("strlib");
+ interfaces_init_common();
login = GET_SYMBOL("login");