Commit c286597a authored by Stefan Fritsch's avatar Stefan Fritsch
Browse files

Introduce new function ap_get_conn_socket() to access the socket of

a connection


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1135153 13f79535-47bb-0310-9956-ffa450edef68
parent d47710c4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2,6 +2,9 @@

Changes with Apache 2.3.13

  *) core: Introduce new function ap_get_conn_socket() to access the socket of
     a connection. [Stefan Fritsch]

  *) mod_data: Introduce a filter to support RFC2397 data URLs. [Graham
     Leggett]

+3 −0
Original line number Diff line number Diff line
@@ -118,6 +118,9 @@
          initial configuration preflight phase or not. This is both easier to
          use and more correct than the old method of creating a pool userdata
          entry in the process pool.</li>
      <li>New function ap_get_conn_socket to get the socket descriptor for a
          connection. This should be used instead of accessing the core
          connection config directly.</li>
    </ul>
  </section>

+2 −1
Original line number Diff line number Diff line
@@ -332,6 +332,7 @@
 *                         context_document_root, context_prefix.
 *                         Add ap_context_*(), ap_set_context_info(), ap_set_document_root()
 * 20110605.1 (2.3.13-dev) add ap_(get|set)_core_module_config()
 * 20110605.2 (2.3.13-dev) add ap_get_conn_socket()
 */

#define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
@@ -339,7 +340,7 @@
#ifndef MODULE_MAGIC_NUMBER_MAJOR
#define MODULE_MAGIC_NUMBER_MAJOR 20110605
#endif
#define MODULE_MAGIC_NUMBER_MINOR 1                    /* 0...n */
#define MODULE_MAGIC_NUMBER_MINOR 2                    /* 0...n */

/**
 * Determine if the server's current MODULE_MAGIC_NUMBER is at least a
+7 −0
Original line number Diff line number Diff line
@@ -336,6 +336,13 @@ AP_DECLARE(void *) ap_get_core_module_config(const ap_conf_vector_t *cv);
 */
AP_DECLARE(void) ap_set_core_module_config(ap_conf_vector_t *cv, void *val);

/** Get the socket from the core network filter. This should be used instead of
 * accessing the core connection config directly.
 * @param c The connection record
 * @return The socket
 */
AP_DECLARE(apr_socket_t *) ap_get_conn_socket(conn_rec *c);

#ifndef AP_DEBUG
#define AP_CORE_MODULE_INDEX  0
#define ap_get_core_module_config(v) \
+1 −1
Original line number Diff line number Diff line
@@ -168,7 +168,7 @@ static int process_echo_connection(conn_rec *c)
        }

        if (!csd) {
            csd = ap_get_core_module_config(c->conn_config);
            csd = ap_get_conn_socket(c);
            apr_socket_timeout_set(csd, c->base_server->keep_alive_timeout);
        }

Loading