bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22789: 25.1.50; In last master build https connections stop working


From: Alain Schneble
Subject: bug#22789: 25.1.50; In last master build https connections stop working
Date: Sun, 28 Feb 2016 00:49:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (windows-nt)

Alain Schneble <address@hidden> 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?






reply via email to

[Prev in Thread] Current Thread [Next in Thread]