X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/2f75bae1a1514b862ba6c1c8a465759b72b518cb..6e48c3fe152811248aad723336445e6e81ec3080:/winnet.c?ds=sidebyside diff --git a/winnet.c b/winnet.c index ad43853d..69322836 100644 --- a/winnet.c +++ b/winnet.c @@ -101,6 +101,7 @@ Socket sk_new(SockAddr addr, int port, sk_receiver_t receiver) { ret->head = ret->tail = NULL; ret->writable = 1; /* to start with */ ret->in_oob = FALSE; + ret->sending_oob = 0; /* * Open socket. @@ -224,6 +225,7 @@ void try_send(Socket s) { } nsent = send(s->s, s->head->buf + s->head->bufpos, len, urgentflag); + noise_ultralight(nsent); if (nsent <= 0) { err = (nsent < 0 ? WSAGetLastError() : 0); if (err == WSAEWOULDBLOCK) { @@ -345,6 +347,8 @@ int select_result(WPARAM wParam, LPARAM lParam) { fatalbox(winsock_error_string(err)); } + noise_ultralight(lParam); + switch (WSAGETSELECTEVENT(lParam)) { case FD_READ: ret = recv(s->s, buf, sizeof(buf), 0); @@ -375,6 +379,7 @@ int select_result(WPARAM wParam, LPARAM lParam) { * which is good enough to keep going at least. */ ioctlsocket(s->s, SIOCATMARK, &atmark); ret = recv(s->s, buf, sizeof(buf), MSG_OOB); + noise_ultralight(ret); if (ret <= 0) { fatalbox(ret == 0 ? "Internal networking trouble" : winsock_error_string(WSAGetLastError()));