diff options
Diffstat (limited to 'src/gnutls_io.c')
-rw-r--r-- | src/gnutls_io.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gnutls_io.c b/src/gnutls_io.c index 14e7cf6..753c87b 100644 --- a/src/gnutls_io.c +++ b/src/gnutls_io.c | |||
@@ -543,8 +543,7 @@ apr_status_t mgs_filter_output(ap_filter_t * f, | |||
543 | apr_bucket *bucket = APR_BRIGADE_FIRST(bb); | 543 | apr_bucket *bucket = APR_BRIGADE_FIRST(bb); |
544 | if (AP_BUCKET_IS_EOC(bucket)) { | 544 | if (AP_BUCKET_IS_EOC(bucket)) { |
545 | do { | 545 | do { |
546 | ret = gnutls_alert_send(ctxt->session, GNUTLS_AL_FATAL, | 546 | ret = gnutls_bye( ctxt->session, GNUTLS_SHUT_WR); |
547 | GNUTLS_A_CLOSE_NOTIFY); | ||
548 | } while(ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN); | 547 | } while(ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN); |
549 | 548 | ||
550 | apr_bucket_copy(bucket, &e); | 549 | apr_bucket_copy(bucket, &e); |
@@ -556,7 +555,6 @@ apr_status_t mgs_filter_output(ap_filter_t * f, | |||
556 | } | 555 | } |
557 | 556 | ||
558 | apr_brigade_cleanup(ctxt->output_bb); | 557 | apr_brigade_cleanup(ctxt->output_bb); |
559 | gnutls_bye(ctxt->session, GNUTLS_SHUT_WR); | ||
560 | gnutls_deinit(ctxt->session); | 558 | gnutls_deinit(ctxt->session); |
561 | continue; | 559 | continue; |
562 | 560 | ||
@@ -568,6 +566,7 @@ apr_status_t mgs_filter_output(ap_filter_t * f, | |||
568 | apr_brigade_cleanup(ctxt->output_bb); | 566 | apr_brigade_cleanup(ctxt->output_bb); |
569 | return status; | 567 | return status; |
570 | } | 568 | } |
569 | |||
571 | apr_brigade_cleanup(ctxt->output_bb); | 570 | apr_brigade_cleanup(ctxt->output_bb); |
572 | continue; | 571 | continue; |
573 | } | 572 | } |
@@ -599,7 +598,7 @@ apr_status_t mgs_filter_output(ap_filter_t * f, | |||
599 | ap_log_error(APLOG_MARK, APLOG_INFO, ctxt->output_rc, | 598 | ap_log_error(APLOG_MARK, APLOG_INFO, ctxt->output_rc, |
600 | ctxt->c->base_server, | 599 | ctxt->c->base_server, |
601 | "GnuTLS: Error writing data." | 600 | "GnuTLS: Error writing data." |
602 | " (%d) '%s'", ret, gnutls_strerror(ret)); | 601 | " (%d) '%s'", (int)ret, gnutls_strerror(ret)); |
603 | if (ctxt->output_rc == APR_SUCCESS) { | 602 | if (ctxt->output_rc == APR_SUCCESS) { |
604 | ctxt->output_rc = APR_EGENERAL; | 603 | ctxt->output_rc = APR_EGENERAL; |
605 | } | 604 | } |