X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..3871d4ca7599c1156e4cca908ebdeb1474608650:/src/common/sckipc.cpp diff --git a/src/common/sckipc.cpp b/src/common/sckipc.cpp index 97374a402a..9787f76858 100644 --- a/src/common/sckipc.cpp +++ b/src/common/sckipc.cpp @@ -85,7 +85,7 @@ static wxSockAddress * GetAddressFromName(const wxString& serverName, const wxString& host = wxEmptyString) { // we always use INET sockets under non-Unix systems -#if defined(__UNIX__) && !defined(__WINDOWS__) && !defined(__WXMAC__) && !defined(__WINE__) +#if defined(__UNIX__) && !defined(__WINDOWS__) && !defined(__WINE__) && (!defined(__WXMAC__) || defined(__DARWIN__)) // under Unix, if the server name looks like a path, create a AF_UNIX // socket instead of AF_INET one if ( serverName.Find(_T('/')) != wxNOT_FOUND ) @@ -163,15 +163,15 @@ wxConnectionBase *wxTCPClient::MakeConnection (const wxString& host, const wxString& serverName, const wxString& topic) { + wxSockAddress *addr = GetAddressFromName(serverName, host); + if ( !addr ) + return NULL; + wxSocketClient *client = new wxSocketClient(SCKIPC_FLAGS); wxSocketStream *stream = new wxSocketStream(*client); wxDataInputStream *data_is = new wxDataInputStream(*stream); wxDataOutputStream *data_os = new wxDataOutputStream(*stream); - wxSockAddress *addr = GetAddressFromName(serverName, host); - if ( !addr ) - return NULL; - bool ok = client->Connect(*addr); delete addr;