Lines Matching refs:conn
869 static APR_INLINE void do_double_reverse (conn_rec *conn)
874 if (conn->double_reverse) {
879 if (conn->remote_host == NULL || conn->remote_host[0] == '\0') {
881 conn->double_reverse = -1;
885 rv = apr_sockaddr_info_get(&sa, conn->remote_host, APR_UNSPEC, 0, 0, conn->pool);
888 if (apr_sockaddr_equal(sa, conn->client_addr)) {
889 conn->double_reverse = 1;
897 conn->double_reverse = -1;
900 AP_DECLARE(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config,
926 && conn->remote_host == NULL
930 if (apr_getnameinfo(&conn->remote_host, conn->client_addr, 0)
932 ap_str_tolower(conn->remote_host);
935 do_double_reverse(conn);
936 if (conn->double_reverse != 1) {
937 conn->remote_host = NULL;
943 if (conn->remote_host == NULL) {
944 conn->remote_host = "";
949 do_double_reverse(conn);
950 if (conn->double_reverse == -1) {
960 if (conn->remote_host != NULL && conn->remote_host[0] != '\0') {
961 return conn->remote_host;
969 return conn->client_ip;
1005 conn_rec *conn = r->connection;
1016 if (conn->local_host == NULL) {
1017 if (apr_getnameinfo(&conn->local_host,
1018 conn->local_addr, 0) != APR_SUCCESS)
1019 conn->local_host = apr_pstrdup(conn->pool,
1022 ap_str_tolower(conn->local_host);
1025 retval = conn->local_host;