From 8c1bb7b498aae6203289dd9295e187b05c8b7014 Mon Sep 17 00:00:00 2001 From: ultramage Date: Sat, 7 Apr 2007 12:06:25 +0000 Subject: - Added function str2ip() to do platform-safe conversions - Removed a bunch of unused stuff - Moved SIGILL to unix-only defines since tests and docs show that Windows doesn't issue SIGILL - Fixed several annoying compilation warnings git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10177 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/char/char.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/char') diff --git a/src/char/char.c b/src/char/char.c index 4cef440bc..705579fbf 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -3977,9 +3977,9 @@ int char_lan_config_read(const char *lancfgName) { if(strcmpi(w1, "subnet") == 0) { - subnet[subnet_count].mask = ntohl(inet_addr(w2)); - subnet[subnet_count].char_ip = ntohl(inet_addr(w3)); - subnet[subnet_count].map_ip = ntohl(inet_addr(w4)); + subnet[subnet_count].mask = str2ip(w2); + subnet[subnet_count].char_ip = str2ip(w3); + subnet[subnet_count].map_ip = str2ip(w4); subnet[subnet_count].subnet = subnet[subnet_count].char_ip&subnet[subnet_count].mask; if (subnet[subnet_count].subnet != (subnet[subnet_count].map_ip&subnet[subnet_count].mask)) { ShowError("%s: Configuration Error: The char server (%s) and map server (%s) belong to different subnetworks!\n", lancfgName, w3, w4); @@ -4284,11 +4284,11 @@ int do_init(int argc, char **argv) ShowStatus("Defaulting to %s as our IP address\n", ip_str); if (!login_ip) { strcpy(login_ip_str, ip_str); - login_ip = ntohl(inet_addr(login_ip_str)); + login_ip = str2ip(login_ip_str); } if (!char_ip) { strcpy(char_ip_str, ip_str); - char_ip = ntohl(inet_addr(char_ip_str)); + char_ip = str2ip(char_ip_str); } } -- cgit v1.2.3-60-g2f50