GNU bug report logs -
#22789
25.1.50; In last master build https connections stop working
Previous Next
Full log
Message #71 received at 22789 <at> debbugs.gnu.org (full text, mbox):
Alain Schneble <a.s <at> realize.ch> writes:
> In w32.c (emacs_gnutls_push) I see that sys_write returns with 0. But
> the buffer to write contains sz=255 bytes. And here errno is 0 after
> the write. This is strange. I guess that here errno should be set to
> EAGAIN... I mean in sys_write...
>
> After this broken emacs_gnutls_push call, gnutls_handshake returns:
>
> -53 GNUTLS_E_PUSH_ERROR
> And later...
> -10 GNUTLS_E_INVALID_SESSION.
Here we go. I think we are getting closer to the root cause of the
problem. In w32.c (sys_write), it runs into the following error:
if (nchars == SOCKET_ERROR)
{
DebPrint (("sys_write.send failed with error %d on socket %ld\n",
pfn_WSAGetLastError (), SOCK_HANDLE (fd)));
set_errno ();
}
Strange thing: set_errno returns with errno == 0. This because
pfn_WSAGetLastError returns 0 as well.
Now, if I do...
if (errno == 0)
errno = EAGAIN;
...just after the call to set_errno above, guess what: It seems to work!
At least for me, it will be an exercise for tomorrow to find the reason
why pfn_WSAGetLastError returns 0 in this case. *snore*
Do you agree it shouldn't return 0?
This bug report was last modified 9 years and 132 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.