X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/fbe6468ee26ff4c5df68d37d8b1b819e68d589a0..53e66fad5465e72c7231ff4af272ab584dd33f1a:/windows/winsftp.c diff --git a/windows/winsftp.c b/windows/winsftp.c index f0f0e304..94d04a75 100644 --- a/windows/winsftp.c +++ b/windows/winsftp.c @@ -19,6 +19,12 @@ int get_userpass_input(prompts_t *p, unsigned char *in, int inlen) return ret; } +void platform_get_x11_auth(struct X11Display *display, const Config *cfg) +{ + /* Do nothing, therefore no auth. */ +} +const int platform_uses_x11_unix_by_default = TRUE; + /* ---------------------------------------------------------------------- * File access abstraction. */ @@ -431,7 +437,7 @@ char *dir_file_cat(char *dir, char *file) * Be told what socket we're supposed to be using. */ static SOCKET sftp_ssh_socket = INVALID_SOCKET; -static HANDLE netevent = NULL; +static HANDLE netevent = INVALID_HANDLE_VALUE; char *do_select(SOCKET skt, int startup) { int events; @@ -481,17 +487,16 @@ int do_eventsel_loop(HANDLE other_event) handles = sresize(handles, nhandles+2, HANDLE); nallhandles = nhandles; - if (netevent) + if (netevent != INVALID_HANDLE_VALUE) handles[netindex = nallhandles++] = netevent; else netindex = -1; - if (other_event) + if (other_event != INVALID_HANDLE_VALUE) handles[otherindex = nallhandles++] = other_event; else otherindex = -1; - n = MsgWaitForMultipleObjects(nallhandles, handles, FALSE, ticks, - QS_POSTMESSAGE); + n = WaitForMultipleObjects(nallhandles, handles, FALSE, ticks); if ((unsigned)(n - WAIT_OBJECT_0) < (unsigned)nhandles) { handle_got_event(handles[n - WAIT_OBJECT_0]); @@ -625,7 +630,7 @@ int ssh_sftp_loop_iteration(void) return 0; } else { - return do_eventsel_loop(NULL); + return do_eventsel_loop(INVALID_HANDLE_VALUE); } }