]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
peeked data now stays also in handshake
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 20 Oct 2001 15:44:21 +0000 (15:44 +0000)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 20 Oct 2001 15:44:21 +0000 (15:44 +0000)
lib/gnutls_buffers.c

index 74d75e0e27d2645826c7dee00872042bb2ec3082..e84d74f8b4e7abe83edc903e1243a2e479824cf7 100644 (file)
@@ -243,9 +243,11 @@ ssize_t _gnutls_read_buffered( int fd, GNUTLS_STATE state, opaque **iptr, size_t
        }
        
        /* leave peeked data to the kernel space only if application data
-        * is received and we don't have any peeked data in gnutls state.
+        * (NEW: or handshake data) is received and we don't have any peeked 
+        * data in gnutls state.
         */
-       if (recv_type != GNUTLS_APPLICATION_DATA && state->gnutls_internals.have_peeked_data==0)
+       if ( (recv_type != GNUTLS_APPLICATION_DATA && recv_type != GNUTLS_HANDSHAKE)
+               && state->gnutls_internals.have_peeked_data==0)
                recvlowat = 0;
 
        buf = state->gnutls_internals.recv_buffer_data;