Fixing several compilation & runtime problems
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10164 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
@@ -3152,7 +3152,6 @@ int parse_char(int fd)
|
||||
int map_fd;
|
||||
struct char_session_data *sd;
|
||||
uint32 ipl = session[fd]->client_addr;
|
||||
uint32 subnet_map_ip;
|
||||
RFIFOHEAD(fd);
|
||||
|
||||
sd = (struct char_session_data*)session[fd]->session_data;
|
||||
@@ -3340,6 +3339,7 @@ int parse_char(int fd)
|
||||
}
|
||||
{
|
||||
//Send player to map.
|
||||
uint32 subnet_map_ip;
|
||||
char map_name[MAP_NAME_LENGTH];
|
||||
snprintf(map_name, MAP_NAME_LENGTH, "%s.gat", mapindex_id2name(char_dat.last_point.map));
|
||||
|
||||
@@ -3349,11 +3349,8 @@ int parse_char(int fd)
|
||||
memcpy(WFIFOP(fd,6), map_name, MAP_NAME_LENGTH);
|
||||
|
||||
// Advanced subnet check [LuzZza]
|
||||
if(subnet_map_ip = lan_subnetcheck(ipl))
|
||||
WFIFOL(fd,22) = htonl(subnet_map_ip);
|
||||
else
|
||||
WFIFOL(fd,22) = htonl(server[i].ip);
|
||||
|
||||
subnet_map_ip = lan_subnetcheck(ipl);
|
||||
WFIFOL(fd,22) = (subnet_map_ip) ? htonl(subnet_map_ip) : htonl(server[i].ip);
|
||||
WFIFOW(fd,26) = server[i].port; // /!\ must be sent in intel host byte order /!\ (client bug)
|
||||
WFIFOSET(fd,28);
|
||||
}
|
||||
@@ -4221,11 +4218,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 = inet_addr(login_ip_str);
|
||||
login_ip = ntohl(inet_addr(login_ip_str));
|
||||
}
|
||||
if (!char_ip) {
|
||||
strcpy(char_ip_str, ip_str);
|
||||
char_ip = inet_addr(char_ip_str);
|
||||
char_ip = ntohl(inet_addr(char_ip_str));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user