summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b682f47)
bombing out X forwarding. It turns out to be a workaround for YET
ANOTHER useless WinSock implementation. Arrgh!
git-svn-id: svn://svn.tartarus.org/sgt/putty@1232
cda61777-01e9-0310-a592-
d414129be87e
noise_ultralight(nsent);
if (nsent <= 0) {
err = (nsent < 0 ? WSAGetLastError() : 0);
noise_ultralight(nsent);
if (nsent <= 0) {
err = (nsent < 0 ? WSAGetLastError() : 0);
- if ((err == 0 && nsent < 0) || err == WSAEWOULDBLOCK) {
+ if ((err < WSABASEERR && nsent < 0) || err == WSAEWOULDBLOCK) {
/*
* Perfectly normal: we've sent all we can for the moment.
*
/*
* Perfectly normal: we've sent all we can for the moment.
*
- * (Apparently some WinSocks can return <0 but
- * leave no error indication - WSAGetLastError() is
- * called but returns zero - so we check that case
- * and treat it just like WSAEWOULDBLOCK.)
+ * (Some WinSock send() implementations can return
+ * <0 but leave no sensible error indication -
+ * WSAGetLastError() is called but returns zero or
+ * a small number - so we check that case and treat
+ * it just like WSAEWOULDBLOCK.)
*/
s->writable = FALSE;
return;
*/
s->writable = FALSE;
return;