mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 08:47:17 +01:00
Add UNICODE checks.
This commit is contained in:
parent
3c33af7640
commit
9843e97802
@ -493,7 +493,11 @@ SockAddr::SockAddr(const SQChar * addr)
|
||||
freeaddrinfo(m_Handle);
|
||||
}
|
||||
// Now it's safe to throw the error
|
||||
#if defined(UNICODE) || defined(_UNICODE)
|
||||
STHROWF("Unable to query the specified address for information [%s]", gai_strerrorA(status));
|
||||
#else
|
||||
STHROWF("Unable to query the specified address for information [%s]", gai_strerror(status));
|
||||
#endif
|
||||
}
|
||||
// Save the specified string address
|
||||
m_Addres.assign(addr ? addr : _SC(""));
|
||||
@ -613,7 +617,11 @@ LookupResult Database::LookupString(const SQChar * addr)
|
||||
// Validate the result of the getaddrinfo() function call
|
||||
if (gai_error != 0)
|
||||
{
|
||||
#if defined(UNICODE) || defined(_UNICODE)
|
||||
STHROWF("Unable to resolve address (%s) because [%s]", addr, gai_strerrorA(gai_error));
|
||||
#else
|
||||
STHROWF("Unable to resolve address (%s) because [%s]", addr, gai_strerror(gai_error));
|
||||
#endif
|
||||
}
|
||||
// Validate the lookup status code
|
||||
else if (mmdb_error != MMDB_SUCCESS)
|
||||
|
Loading…
Reference in New Issue
Block a user