aboutsummaryrefslogtreecommitdiffstats
path: root/src/gnutls_io.c
diff options
context:
space:
mode:
authorGravatar Nikos Mavrogiannopoulos 2009-07-20 20:39:22 +0000
committerGravatar Nokis Mavrogiannopoulos 2009-07-20 20:39:22 +0000
commitc05a8bb001e24da956adf3146728e8ef5a028297 (patch)
tree7c89f4f13ff235dc17275b9abe717ff40021f90c /src/gnutls_io.c
parentc38a4e93e8f815dfd900f0b7058de5f183a34d1a (diff)
only call gnutls_bye on non null gnutls session.
Diffstat (limited to 'src/gnutls_io.c')
-rw-r--r--src/gnutls_io.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gnutls_io.c b/src/gnutls_io.c
index b06afd7..a8fd242 100644
--- a/src/gnutls_io.c
+++ b/src/gnutls_io.c
@@ -544,9 +544,11 @@ apr_status_t mgs_filter_output(ap_filter_t * f,
544 while (!APR_BRIGADE_EMPTY(bb)) { 544 while (!APR_BRIGADE_EMPTY(bb)) {
545 apr_bucket *bucket = APR_BRIGADE_FIRST(bb); 545 apr_bucket *bucket = APR_BRIGADE_FIRST(bb);
546 if (AP_BUCKET_IS_EOC(bucket)) { 546 if (AP_BUCKET_IS_EOC(bucket)) {
547 do { 547 if (ctxt->session != NULL) {
548 ret = gnutls_bye( ctxt->session, GNUTLS_SHUT_WR); 548 do {
549 } while(ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN); 549 ret = gnutls_bye( ctxt->session, GNUTLS_SHUT_WR);
550 } while(ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN);
551 }
550 552
551 apr_bucket_copy(bucket, &e); 553 apr_bucket_copy(bucket, &e);
552 APR_BRIGADE_INSERT_TAIL(ctxt->output_bb, e); 554 APR_BRIGADE_INSERT_TAIL(ctxt->output_bb, e);