summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 16c3b4589..b6044c166 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -153,6 +153,7 @@ enum {
static char map_ip_str[16];
static in_addr_t map_ip;
+static in_addr_t bind_ip = INADDR_ANY;
static int map_port = 5121;
int map_fd;
char talkie_mes[80];
@@ -167,6 +168,11 @@ void clif_setip(char *ip)
map_ip = inet_addr(map_ip_str);
}
+void clif_setbindip(char *ip)
+{
+ bind_ip = inet_addr(ip);
+}
+
/*==========================================
* mapŽI‚ÌportÝ’è
*------------------------------------------
@@ -11357,14 +11363,14 @@ int do_init_clif(void) {
set_defaultparse(clif_parse);
#ifdef __WIN32
//if (!make_listen_port(map_port)) {
- if (!make_listen_bind(map_ip,map_port)) {
+ if (!make_listen_bind(bind_ip,map_port)) {
printf("cant bind game port\n");
exit(1);
}
#else
for(i = 0; i < 10; i++) {
//if (make_listen_port(map_port))
- if (make_listen_bind(map_ip,map_port))
+ if (make_listen_bind(bind_ip,map_port))
break;
sleep(20);
}