diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2006-01-29 10:37:39 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2006-01-29 10:37:39 +0000 |
commit | 9b1e471b4dfe72a0d45f285ef0bad943b31b9bab (patch) | |
tree | 5ec48568c3ed2f7b3313fa170478c1b99c9791e7 | |
parent | 70e83a4ab543e7b19bc6bdfc0942078eb170918d (diff) | |
download | gnutls-9b1e471b4dfe72a0d45f285ef0bad943b31b9bab.tar.gz |
fixed bug in non-blocking gnutls_bye(). gnutls_send will no longer invalidate session if the underlying send fails, but it will set may_not_write to true. That is to allow reading the already received data. Patches and bug reports by Yoann Vandoorselaere <yoann@prelude-ids.org>
-rw-r--r-- | lib/gnutls_record.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gnutls_record.c b/lib/gnutls_record.c index c23a4b3d02..b543472565 100644 --- a/lib/gnutls_record.c +++ b/lib/gnutls_record.c @@ -210,6 +210,7 @@ gnutls_bye (gnutls_session_t session, gnutls_close_request_t how) } case STATE62: + STATE = STATE62; if (how == GNUTLS_SHUT_RDWR) { do @@ -437,7 +438,7 @@ _gnutls_send_int (gnutls_session_t session, content_type_t type, ret = GNUTLS_E_INTERNAL_ERROR; } session_unresumable (session); - session_invalidate (session); + session->internals.may_not_write = 1; gnutls_assert (); return ret; } |