aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2012-02-16 13:10:49 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2012-02-16 13:12:21 +0200
commit1de41968fc735f701f3a0cf2d1d05023a00b7971 (patch)
tree0242f10e911775a2e14b91c19d170b3a340183b2
parenta36a884abc0d75d4b4cea486fd846d0dac5f077a (diff)
downloadslb-1de41968fc735f701f3a0cf2d1d05023a00b7971.tar.gz
slb-1de41968fc735f701f3a0cf2d1d05023a00b7971.tar.bz2
Remove the index statement.
* src/config.c (cb_index): Remove. (server_kw) <index>: Remove.
-rw-r--r--src/config.c43
1 files changed, 1 insertions, 42 deletions
diff --git a/src/config.c b/src/config.c
index f9782bb..b7566b5 100644
--- a/src/config.c
+++ b/src/config.c
@@ -203,40 +203,6 @@ cb_table(enum grecs_callback_command cmd,
return 0;
}
-int
-cb_index(enum grecs_callback_command cmd,
- grecs_locus_t *locus,
- void *varptr,
- grecs_value_t *value,
- void *cb_data)
-{
- struct slb_server *srv = varptr;
- struct slb_table *tab;
- struct slb_index *idx;
- int install;
-
- if (assert_n_strings(locus, cmd, value, 3, 3))
- return 1;
- tab = table_lookupz(srv->tables, value->v.arg.v[2]->v.string, NULL);
- if (!tab) {
- grecs_error(locus, 0,
- _("no SNMP table of such name known: %s"),
- value->v.arg.v[2]->v.string);
- return 1;
- }
-
- install = 1;
- idx = index_lookupz(srv->indices, value->v.arg.v[0]->v.string,
- &install);
- if (!install)
- grecs_error(locus, 0,
- _("redefinition of index %s"), idx->idx_sym.name);
- idx->idx_table = tab;
- idx->idx_tag = grecs_strdup(value->v.arg.v[1]->v.string);
-
- return 0;
-}
-
static void
clone_locus(grecs_locus_t *dst, grecs_locus_t *src)
{
@@ -275,9 +241,7 @@ parse_index(char *name, struct slb_server *srv, grecs_locus_t *locus)
}
}
} else {
- idx = index_lookupz(srv->indices, name, NULL);
- if (!idx)
- grecs_error(locus, 0, _("unknown index: %s"), name);
+ grecs_error(locus, 0, _("invalid index: %s"), name);
}
return idx;
}
@@ -792,11 +756,6 @@ static struct grecs_keyword server_kw[] = {
grecs_type_string, GRECS_DFLT,
NULL, offsetof(struct slb_server, tables),
cb_table },
- { "index", N_("<name: string> <tag: string> <table: string>"),
- N_("Define an index into SNMP table"),
- grecs_type_string, GRECS_DFLT,
- NULL, 0,
- cb_index },
{ "variable", N_("<name: string> <oid: string>"),
N_("Define SNMP variable"),
grecs_type_string, GRECS_MULT,

Return to:

Send suggestions and report system problems to the System administrator.