From 9ed1f2f466d52d56d71b94a9eb5f2b2988eea99d Mon Sep 17 00:00:00 2001 From: csoler Date: Thu, 14 May 2015 12:36:27 +0000 Subject: [PATCH] rebased patch 0002-Respect-passed-parameters-in-unix_socket.patch to new IPv6 branch git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-IPv6-2@8234 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/pqi/pqinetwork.cc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/libretroshare/src/pqi/pqinetwork.cc b/libretroshare/src/pqi/pqinetwork.cc index b54408fd3..0ec2377c1 100644 --- a/libretroshare/src/pqi/pqinetwork.cc +++ b/libretroshare/src/pqi/pqinetwork.cc @@ -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; }