summaryrefslogtreecommitdiff
path: root/src/char
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-07 12:06:25 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-07 12:06:25 +0000
commit8c1bb7b498aae6203289dd9295e187b05c8b7014 (patch)
treebaabad310c3bef2983e12c33ff3bb417f5230a8d /src/char
parentba13e8d6612aaddebe640d0538f9bb859b600ba2 (diff)
downloadhercules-8c1bb7b498aae6203289dd9295e187b05c8b7014.tar.gz
hercules-8c1bb7b498aae6203289dd9295e187b05c8b7014.tar.bz2
hercules-8c1bb7b498aae6203289dd9295e187b05c8b7014.tar.xz
hercules-8c1bb7b498aae6203289dd9295e187b05c8b7014.zip
- 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
Diffstat (limited to 'src/char')
-rw-r--r--src/char/char.c10
1 files changed, 5 insertions, 5 deletions
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);
}
}