-const char filters_rcs[] = "$Id: filters.c,v 1.120 2009/04/17 11:45:19 fabiankeil Exp $";
+const char filters_rcs[] = "$Id: filters.c,v 1.123 2009/06/19 15:50:53 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/filters.c,v $
* `execute_single_pcrs_command', `rewrite_url',
* `get_last_url'
*
- * Copyright : Written by and Copyright (C) 2001, 2004-2008 the SourceForge
+ * Copyright : Written by and Copyright (C) 2001, 2004-2009 the
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
* Returns : 0 = no errror; -1 otherwise.
*
*********************************************************************/
-int sockaddr_storage_to_ip(const struct sockaddr_storage *addr, uint8_t **ip,
- unsigned int *len, in_port_t **port)
+static int sockaddr_storage_to_ip(const struct sockaddr_storage *addr,
+ uint8_t **ip, unsigned int *len,
+ in_port_t **port)
{
if (NULL == addr)
{
* Returns : 0 = doesn't match; 1 = does match
*
*********************************************************************/
-int match_sockaddr(const struct sockaddr_storage *network,
- const struct sockaddr_storage *netmask,
- const struct sockaddr_storage *address)
+static int match_sockaddr(const struct sockaddr_storage *network,
+ const struct sockaddr_storage *netmask,
+ const struct sockaddr_storage *address)
{
uint8_t *network_addr, *netmask_addr, *address_addr;
unsigned int addr_len;
hints.ai_socktype = SOCK_STREAM;
i = getaddrinfo(acl_spec, ((p) ? ++p : NULL), &hints, &result);
- freez(acl_spec);
if (i != 0)
{
log_error(LOG_LEVEL_ERROR, "Can not resolve [%s]:%s: %s",
acl_spec, p, gai_strerror(i));
+ freez(acl_spec);
return(-1);
}
+ freez(acl_spec);
/* TODO: Allow multihomed hostnames */
memcpy(&(aca->addr), result->ai_addr, result->ai_addrlen);
{
filter_function_ptr filter_function = NULL;
+ if ((csp->content_type & CT_TABOO)
+ && !(csp->action->flags & ACTION_FORCE_TEXT_MODE))
+ {
+ return NULL;
+ }
+
/*
* Are we enabling text mode by force?
*/