Changeset 2ceb836 in mod_gnutls


Ignore:
Timestamp:
Nov 20, 2015, 7:37:15 PM (2 years ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
master, debian, jessie-backports, upstream
Children:
a2368a4
Parents:
401a0de
git-author:
Thomas Klute <thomas2.klute@…> (11/20/15 19:33:57)
git-committer:
Thomas Klute <thomas2.klute@…> (11/20/15 19:37:15)
Message:

Update log messages on session termination (cleanup_gnutls_session, mgs_bye)

  • Pass proper APR error codes to ap_log_cerror
  • Warn if a TLS session was not properly terminated by the filters (cleanup_gnutls_session only)
Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_hooks.c

    rdff03fa r2ceb836  
    694694}
    695695
    696 /*
     696/**
    697697 * This function is intended as a cleanup handler for connections
    698  * using GnuTLS.
     698 * using GnuTLS. If attached to the connection pool, it ensures that
     699 * session resources are released with the connection pool even if the
     700 * session wasn't terminated properly.
    699701 *
    700702 * @param data must point to the mgs_handle_t associated with the
     
    711713    if (ctxt->session != NULL)
    712714    {
     715        ap_log_cerror(APLOG_MARK, APLOG_WARNING, APR_ECONNABORTED, ctxt->c,
     716                      "%s: connection pool cleanup in progress but %sTLS "
     717                      "session hasn't been terminated, trying to close",
     718                      __func__, IS_PROXY_STR(ctxt));
    713719        int ret;
    714720        /* Try A Clean Shutdown */
     
    717723        while (ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN);
    718724        if (ret != GNUTLS_E_SUCCESS)
    719             ap_log_cerror(APLOG_MARK, APLOG_INFO, ret, ctxt->c,
     725            ap_log_cerror(APLOG_MARK, APLOG_INFO, APR_EGENERAL, ctxt->c,
    720726                          "%s: error while closing TLS %sconnection: %s (%d)",
    721727                          __func__, IS_PROXY_STR(ctxt),
    722728                          gnutls_strerror(ret), ret);
    723729        else
    724             ap_log_cerror(APLOG_MARK, APLOG_DEBUG, ret, ctxt->c,
     730            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, ctxt->c,
    725731                          "%s: TLS %sconnection closed.",
    726732                          __func__, IS_PROXY_STR(ctxt));
  • src/gnutls_io.c

    r401a0de r2ceb836  
    513513        } while (ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN);
    514514        if (ret != GNUTLS_E_SUCCESS)
    515             ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, ctxt->c,
     515            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, APR_EGENERAL, ctxt->c,
    516516                          "%s: Error while closing TLS %sconnection: "
    517517                          "'%s' (%d)",
     
    519519                          gnutls_strerror(ret), (int) ret);
    520520        else
    521             ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, ctxt->c,
     521            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, ctxt->c,
    522522                          "%s: TLS %sconnection closed.",
    523523                          __func__, IS_PROXY_STR(ctxt));
Note: See TracChangeset for help on using the changeset viewer.