forked from metin2/server
Database now runs on linux
This commit is contained in:
@@ -267,7 +267,7 @@ bool GetIPInfo()
|
||||
|
||||
if (!strncmp(netip, "192.168", 7)) // ignore if address is starting with 192
|
||||
{
|
||||
strlcpy(g_szInternalIP, netip, sizeof(g_szInternalIP));
|
||||
strncpy(g_szInternalIP, netip, sizeof(g_szInternalIP));
|
||||
#ifndef __WIN32__
|
||||
fprintf(stderr, "INTERNAL_IP: %s interface %s\n", netip, ifap->ifa_name);
|
||||
#else
|
||||
@@ -276,7 +276,7 @@ bool GetIPInfo()
|
||||
}
|
||||
else if (!strncmp(netip, "10.", 3))
|
||||
{
|
||||
strlcpy(g_szInternalIP, netip, sizeof(g_szInternalIP));
|
||||
strncpy(g_szInternalIP, netip, sizeof(g_szInternalIP));
|
||||
#ifndef __WIN32__
|
||||
fprintf(stderr, "INTERNAL_IP: %s interface %s\n", netip, ifap->ifa_name);
|
||||
#else
|
||||
@@ -285,7 +285,7 @@ bool GetIPInfo()
|
||||
}
|
||||
else if (g_szPublicIP[0] == '0')
|
||||
{
|
||||
strlcpy(g_szPublicIP, netip, sizeof(g_szPublicIP));
|
||||
strncpy(g_szPublicIP, netip, sizeof(g_szPublicIP));
|
||||
#ifndef __WIN32__
|
||||
fprintf(stderr, "PUBLIC_IP: %s interface %s\n", netip, ifap->ifa_name);
|
||||
#else
|
||||
@@ -768,7 +768,7 @@ void config_init(const string& st_localeServiceName)
|
||||
|
||||
TOKEN("db_addr")
|
||||
{
|
||||
strlcpy(db_addr, value_string, sizeof(db_addr));
|
||||
strncpy(db_addr, value_string, sizeof(db_addr));
|
||||
|
||||
for (int n =0; n < ADDRESS_MAX_LEN; ++n)
|
||||
{
|
||||
@@ -966,7 +966,7 @@ void config_init(const string& st_localeServiceName)
|
||||
|
||||
TOKEN("teen_addr")
|
||||
{
|
||||
strlcpy(teen_addr, value_string, sizeof(teen_addr));
|
||||
strncpy(teen_addr, value_string, sizeof(teen_addr));
|
||||
|
||||
for (int n =0; n < ADDRESS_MAX_LEN; ++n)
|
||||
{
|
||||
@@ -1009,7 +1009,7 @@ void config_init(const string& st_localeServiceName)
|
||||
|
||||
TOKEN("bind_ip")
|
||||
{
|
||||
strlcpy(g_szPublicIP, value_string, sizeof(g_szPublicIP));
|
||||
strncpy(g_szPublicIP, value_string, sizeof(g_szPublicIP));
|
||||
}
|
||||
|
||||
TOKEN("view_range")
|
||||
|
Reference in New Issue
Block a user