+// plugin callback to get a config value
+static void *getconfig(char *key, enum config_typet type)
+{
+ int i;
+
+ for (i = 0; config_values[i].key; i++)
+ {
+ if (!strcmp(config_values[i].key, key))
+ {
+ if (config_values[i].type == type)
+ return ((void *) config) + config_values[i].offset;
+
+ LOG(1, 0, 0, 0, "plugin requested config item \"%s\" expecting type %d, have type %d\n",
+ key, type, config_values[i].type);
+
+ return 0;
+ }
+ }
+
+ LOG(1, 0, 0, 0, "plugin requested unknown config item \"%s\"\n", key);
+ return 0;
+}
+