diff options
author | marha <marha@users.sourceforge.net> | 2012-01-13 17:04:47 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-01-13 17:04:47 +0100 |
commit | e2e1bdced7e09e39fed613dae1f2f3096cb18118 (patch) | |
tree | 63c7066c79d1053c7656b6175e22e2ced6f11e01 /libxcb/src/xcb_util.c | |
parent | cc96d00cae473f472e371328ce8dc572ad258073 (diff) | |
parent | 5cfbe97cd797d8f78ece208bb5114704b83d8aab (diff) | |
download | vcxsrv-e2e1bdced7e09e39fed613dae1f2f3096cb18118.tar.gz vcxsrv-e2e1bdced7e09e39fed613dae1f2f3096cb18118.tar.bz2 vcxsrv-e2e1bdced7e09e39fed613dae1f2f3096cb18118.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
libxcb/src/xcb_auth.c
libxcb/src/xcb_conn.c
libxcb/src/xcb_out.c
libxcb/src/xcb_util.c
xorg-server/dix/dispatch.c
xorg-server/include/dixstruct.h
xorg-server/include/misc.h
xorg-server/os/connection.c
Diffstat (limited to 'libxcb/src/xcb_util.c')
-rw-r--r-- | libxcb/src/xcb_util.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/libxcb/src/xcb_util.c b/libxcb/src/xcb_util.c index 4fc8797c5..645d083e4 100644 --- a/libxcb/src/xcb_util.c +++ b/libxcb/src/xcb_util.c @@ -35,12 +35,12 @@ #include <unistd.h> #include <string.h> #ifndef _MSC_VER -#include <arpa/inet.h> #endif #ifdef _WIN32 #include "xcb_windefs.h" #else +#include <arpa/inet.h> #include <sys/socket.h> #include <sys/un.h> #include <netinet/in.h> @@ -455,13 +455,24 @@ xcb_connection_t *xcb_connect_to_display_with_auth_info(const char *displayname, int parsed = _xcb_parse_display(displayname, &host, &protocol, &display, screenp); if(!parsed) { - c = (xcb_connection_t *) &error_connection; + c = _xcb_conn_ret_error(XCB_CONN_CLOSED_PARSE_ERR); goto out; - } else + } else { +#ifdef _WIN32 + WSADATA wsaData; + if (WSAStartup(MAKEWORD(2, 2), &wsaData) != 0) { + c = (xcb_connection_t *) &error_connection; + goto out; + } +#endif fd = _xcb_open(host, protocol, display); + } if(fd == -1) { - c = (xcb_connection_t *) &error_connection; + c = _xcb_conn_ret_error(XCB_CONN_ERROR); +#ifdef _WIN32 + WSACleanup(); +#endif goto out; } |