- if (strcmp (gchild->key, "Socket") == 0)
- {
- if (gchild->values_num != 1 ||
- gchild->values[0].type != OCONFIG_TYPE_STRING)
- {
- WARNING ("powerdns plugin: config option `%s'"
- " should have exactly one string value.",
- gchild->key);
- continue;
- }
- if (item->remote.sun_family == AF_UNIX)
- {
- WARNING ("powerdns plugin: ignoring extraneous"
- " `%s' config option.", gchild->key);
- continue;
- }
- item->remote.sun_family = item->local.sun_family = AF_UNIX;
- strncpy (item->remote.sun_path, gchild->values[0].value.string,
- sizeof (item->remote.sun_path));
- strncpy (item->local.sun_path, gchild->values[0].value.string,
- sizeof (item->remote.sun_path));
- }
- else if (strcmp (gchild->key, "Command") == 0)
- {
- if (gchild->values_num != 1
- || gchild->values[0].type != OCONFIG_TYPE_NUMBER)
- {
- WARNING ("powerdns plugin: config option `%s'"
- " should have exactly one string value.",
- gchild->key);
- continue;
- }
- if (item->command != COMMAND_RECURSOR &&
- item->command != COMMAND_SERVER)
- {
- WARNING ("powerdns plugin: ignoring extraneous"
- " `%s' config option.", gchild->key);
- continue;
- }
- item->command = strdup (gchild->values[0].value.string);
- if (item->command == NULL)
- {
- ERROR ("powerdns plugin: `strdup' failed.");
- llentry_destroy (entry);
- free (item->instance);
- free (item);
- return 1;
- }
- }
- else
- {
- WARNING ("powerdns plugin: Ignoring unknown config option"
- " `%s'.", gchild->key);
- continue;
- }
-
- if (gchild->children_num)
- {
- WARNING ("powerdns plugin: config option `%s' should not"
- " have children.", gchild->key);
- }