-const char filters_rcs[] = "$Id: filters.c,v 1.167 2012/03/04 11:51:25 fabiankeil Exp $";
+const char filters_rcs[] = "$Id: filters.c,v 1.171 2012/03/18 13:47:33 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/filters.c,v $
#else
(csp->ip_addr_long & acl->src->mask) == acl->src->addr
#endif
- )
+ )
{
if (dst == NULL)
{
((dst->addr & acl->dst->mask) == acl->dst->addr)
&& ((dst->port == acl->dst->port) || (acl->dst->port == 0))
#endif
- )
+ )
{
if (acl->action == ACL_PERMIT)
{
#else
(masklength > 32)
#endif
- )
+ )
{
freez(acl_spec);
return(-1);
/* determine HOW images should be blocked */
p = csp->action->string[ACTION_STRING_IMAGE_BLOCKER];
- if(csp->action->flags & ACTION_HANDLE_AS_EMPTY_DOCUMENT)
+ if (csp->action->flags & ACTION_HANDLE_AS_EMPTY_DOCUMENT)
{
log_error(LOG_LEVEL_ERROR, "handle-as-empty-document overruled by handle-as-image.");
}
}
else
#endif /* def FEATURE_IMAGE_BLOCKING */
- if(csp->action->flags & ACTION_HANDLE_AS_EMPTY_DOCUMENT)
+ if (csp->action->flags & ACTION_HANDLE_AS_EMPTY_DOCUMENT)
{
/*
* Send empty document.
if (NULL == url_segments)
{
- log_error(LOG_LEVEL_ERROR, "Out of memory while decoding URL: %s", new_url);
+ log_error(LOG_LEVEL_ERROR,
+ "Out of memory while decoding URL: %s", subject);
freez(subject);
return NULL;
}
- segments = ssplit(subject, "?&", url_segments, max_segments, 1, 1);
+ segments = ssplit(subject, "?&", url_segments, max_segments);
while (segments-- > 0)
{
}
if ((new_url != NULL)
- && ( (new_url != subject)
+ && ( (new_url != subject)
|| (0 == strncmpic(subject, "http://", 7))
|| (0 == strncmpic(subject, "https://", 8))
- ))
+ ))
{
/*
* Return new URL if we found a redirect
string_append(&new_entry, csp->http->hostport);
path = csp->http->path;
- if ((path[0] == '/')
+ if ( (path[0] == '/')
&& (path[1] == '~')
&& ((path_end = strchr(path + 2, '/')) != NULL))
{
size = (size_t)(csp->iob->eod - csp->iob->cur);
- if ( (NULL == (in = (struct binbuffer *)zalloc(sizeof *in)))
- || (NULL == (out = (struct binbuffer *)zalloc(sizeof *out))))
+ if ( (NULL == (in = (struct binbuffer *)zalloc(sizeof *in )))
+ || (NULL == (out = (struct binbuffer *)zalloc(sizeof *out))) )
{
log_error(LOG_LEVEL_DEANIMATE, "failed! (no mem)");
return NULL;
return NULL;
}
- vec_count = ssplit(forward_settings, " \t", vec, SZ(vec), 1, 1);
+ vec_count = ssplit(forward_settings, " \t", vec, SZ(vec));
if ((vec_count == 2) && !strcasecmp(vec[0], "forward"))
{
fwd->type = SOCKS_NONE;