From: Joe Shaw Date: Mon, 2 Feb 2004 18:01:28 +0000 (+0000) Subject: Call gnutls_bye() with the GNUTLS_SHUT_WR flag (instead of RDWR) and check X-Git-Tag: LIBSOUP_2_1_6~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ef972798309087651a4976d02f02510b995a527a;p=platform%2Fupstream%2Flibsoup.git Call gnutls_bye() with the GNUTLS_SHUT_WR flag (instead of RDWR) and check 2004-02-02 Joe Shaw * libsoup/soup-gnutls.c (soup_gnutls_close): Call gnutls_bye() with the GNUTLS_SHUT_WR flag (instead of RDWR) and check only for GNUTLS_E_INTERRUPTED. GNUTLS_E_AGAIN will be returned by recv() when there are no messages on the wire on a non-blocking socket. This sends a SSL hangup message and then allows us to immediately close the socket. --- diff --git a/ChangeLog b/ChangeLog index f3ec5a4..143f706 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2004-02-02 Joe Shaw + + * libsoup/soup-gnutls.c (soup_gnutls_close): Call gnutls_bye() + with the GNUTLS_SHUT_WR flag (instead of RDWR) and check only for + GNUTLS_E_INTERRUPTED. GNUTLS_E_AGAIN will be returned by recv() + when there are no messages on the wire on a non-blocking socket. + This sends a SSL hangup message and then allows us to immediately + close the socket. + 2004-01-30 Rodrigo Moya * configure.in: bumped version number to 2.1.6. diff --git a/libsoup/soup-gnutls.c b/libsoup/soup-gnutls.c index 88ea0cc..319b677 100644 --- a/libsoup/soup-gnutls.c +++ b/libsoup/soup-gnutls.c @@ -247,9 +247,8 @@ soup_gnutls_close (GIOChannel *channel, int ret; do { - ret = gnutls_bye (chan->session, GNUTLS_SHUT_RDWR); - } while (ret == GNUTLS_E_INTERRUPTED || - ret == GNUTLS_E_AGAIN); + ret = gnutls_bye (chan->session, GNUTLS_SHUT_WR); + } while (ret == GNUTLS_E_INTERRUPTED); } return chan->real_sock->funcs->io_close (channel, err);