config-filter.c revision 04ce187ba9c7c98b4f3fbaa833a2dc929e4281b8
/* Copyright (C) 2005-2009 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "settings-parser.h"
#include "config-parser.h"
#include "config-filter.h"
struct config_filter_context {
struct config_filter_parser *const *parsers;
};
const struct config_filter *filter)
{
return FALSE;
return FALSE;
}
/* FIXME: it's not comparing full masks */
if (mask->remote_bits != 0) {
if (filter->remote_bits == 0)
return FALSE;
mask->remote_bits))
return FALSE;
}
if (mask->local_bits != 0) {
if (filter->local_bits == 0)
return FALSE;
mask->local_bits))
return FALSE;
}
return TRUE;
}
const struct config_filter *f2)
{
return FALSE;
return FALSE;
return FALSE;
return FALSE;
return FALSE;
return TRUE;
}
{
struct config_filter_context *ctx;
return ctx;
}
{
unsigned int i;
}
struct config_filter_parser *const *parsers)
{
}
static int
struct config_filter_parser *const *p2)
{
/* remote_ip and local_ips are first, although it doesn't really
matter which one comes first */
return -1;
return 1;
return -1;
return 1;
return -1;
return 1;
return 0;
}
static struct config_filter_parser *const *
const struct config_filter *filter)
{
unsigned int i;
}
(void)array_append_space(&matches);
}
static bool
const struct config_filter *filter)
{
/* assume that both of the filters match the same subset, so we don't
need to compare IPs and service name. */
return FALSE;
return FALSE;
return FALSE;
return TRUE;
}
static int
const struct config_filter_parser *src,
{
unsigned int i;
error_r) < 0) {
"found from filter at %s", *error_r,
src->file_and_line);
return -1;
}
}
return 0;
}
const struct config_filter *filter,
struct config_module_parser **parsers_r,
const char **error_r)
{
struct config_filter_parser *const *src;
struct config_module_parser *dest;
unsigned int i, count;
/* all of them should have the same number of parsers.
duplicate our initial parsers from the first match */
for (i = 0; i < count; i++) {
}
/* apply the changes from rest of the matches */
else
error_p) < 0) {
return -1;
}
}
return 0;
}
{
unsigned int i;
}