1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-23 16:48:49 -05:00

sockfilt: add logmsg output to select_ws_wait_thread on Windows

Assisted-by: Jay Satiro
Reviewed-by: Daniel Stenberg

Closes #5086
This commit is contained in:
Marc Hoersken 2020-03-11 14:19:59 +01:00
parent 361d4f3fdc
commit 6d45588ba3
No known key found for this signature in database
GPG Key ID: 61E03CBED7BC859E

View File

@ -589,6 +589,7 @@ static DWORD WINAPI select_ws_wait_thread(LPVOID lpParameter)
}
}
/* there is some data available, stop waiting */
logmsg("[select_ws_wait_thread] data available on DISK: %p", handle);
break;
}
break;
@ -618,6 +619,7 @@ static DWORD WINAPI select_ws_wait_thread(LPVOID lpParameter)
}
}
/* there is some data available, stop waiting */
logmsg("[select_ws_wait_thread] data available on CHAR: %p", handle);
break;
}
break;
@ -640,15 +642,21 @@ static DWORD WINAPI select_ws_wait_thread(LPVOID lpParameter)
SleepEx(0, FALSE);
continue;
}
else {
logmsg("[select_ws_wait_thread] PeekNamedPipe len: %d", length);
}
}
else {
/* if the pipe has been closed, sleep and continue waiting */
if(GetLastError() == ERROR_BROKEN_PIPE) {
length = GetLastError();
logmsg("[select_ws_wait_thread] PeekNamedPipe error: %d", length);
if(length == ERROR_BROKEN_PIPE) {
SleepEx(0, FALSE);
continue;
}
}
/* there is some data available, stop waiting */
logmsg("[select_ws_wait_thread] data available on PIPE: %p", handle);
break;
}
break;
@ -656,6 +664,7 @@ static DWORD WINAPI select_ws_wait_thread(LPVOID lpParameter)
default:
/* The handle has an unknown type, try to wait on it */
WaitForMultipleObjectsEx(2, handles, FALSE, INFINITE, FALSE);
logmsg("[select_ws_wait_thread] data available on HANDLE: %p", handle);
break;
}