0002 Respect passed params in unix socket (Patch from G10H4ck)

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-IPv6@8026 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-03-15 15:19:39 +00:00
parent bb1d7a8607
commit 937bc54462

View file

@ -850,16 +850,14 @@ int unix_close(int fd)
return ret;
}
int unix_socket(int /*domain*/, int /*type*/, int /*protocol*/)
int unix_socket(int domain, int type, int protocol)
{
int osock = socket(PF_INET, SOCK_STREAM, 0);
/******************* WINDOWS SPECIFIC PART ******************/
#ifdef WINDOWS_SYS // WINDOWS
int osock = socket(domain, type, protocol);
#ifdef WINDOWS_SYS
#ifdef NET_DEBUG
std::cerr << "unix_socket()" << std::endl;
#endif
#endif // NET_DEBUG
if ((unsigned) osock == INVALID_SOCKET)
{
@ -867,8 +865,8 @@ int unix_socket(int /*domain*/, int /*type*/, int /*protocol*/)
osock = -1;
errno = WinToUnixError(WSAGetLastError());
}
#endif
/******************* WINDOWS SPECIFIC PART ******************/
#endif // WINDOWS_SYS
return osock;
}