use public API instead of patching the cond-cache ourself

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1943 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.17
Jan Kneschke 2007-08-18 09:43:35 +00:00
parent 3940c60e68
commit f978d992df
1 changed files with 7 additions and 19 deletions

View File

@ -1,3 +1,7 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
@ -11,9 +15,7 @@
#include "plugin.h"
#include "inet_ntop_cache.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "configfile.h"
/**
* mod_extforward.c for lighttpd, by comman.kang <at> gmail <dot> com
@ -301,21 +303,9 @@ struct addrinfo *ipstr_to_sockaddr(const char *host)
}
static void clean_cond_cache(server *srv, connection *con)
{
size_t i;
log_error_write(srv, __FILE__, __LINE__, "s", "");
for (i = 0; i < srv->config_context->used; i++) {
data_config *dc = (data_config *)srv->config_context->data[i];
if (dc->comp == COMP_HTTP_REMOTEIP)
{
con->cond_cache[i].result = COND_RESULT_UNSET;
con->cond_cache[i].patterncount = 0;
}
}
static void clean_cond_cache(server *srv, connection *con) {
config_cond_cache_reset_item(srv, con, COMP_HTTP_REMOTEIP);
}
URIHANDLER_FUNC(mod_extforward_uri_handler) {
@ -452,8 +442,6 @@ CONNECTION_FUNC(mod_extforward_restore) {
if (!hctx) return HANDLER_GO_ON;
log_error_write(srv, __FILE__, __LINE__, "s", "");
con->dst_addr = hctx->saved_remote_addr;
buffer_free(con->dst_addr_buf);