Win32: change buffer size for gethotsname in Discover()
- 256 byte is the maximum, as per http://msdn.microsoft.com/en-us/library/windows/desktop/ms738527%28v=vs.85%29.aspx
This commit is contained in:
parent
8fa0494e92
commit
cd4d3f1915
1 changed files with 1 additions and 1 deletions
|
@ -1559,7 +1559,7 @@ void static Discover(boost::thread_group& threadGroup)
|
|||
|
||||
#ifdef WIN32
|
||||
// Get local host IP
|
||||
char pszHostName[1000] = "";
|
||||
char pszHostName[256] = "";
|
||||
if (gethostname(pszHostName, sizeof(pszHostName)) != SOCKET_ERROR)
|
||||
{
|
||||
vector<CNetAddr> vaddr;
|
||||
|
|
Loading…
Reference in a new issue