input_init: add assertions on completeness of plugins

This commit is contained in:
Max Kellermann 2011-01-08 18:27:31 +01:00
parent cf696ce443
commit 5184008812
1 changed files with 6 additions and 0 deletions

View File

@ -24,6 +24,7 @@
#include "conf.h"
#include "glib_compat.h"
#include <assert.h>
#include <string.h>
static inline GQuark
@ -67,6 +68,11 @@ input_stream_global_init(GError **error_r)
for (unsigned i = 0; input_plugins[i] != NULL; ++i) {
const struct input_plugin *plugin = input_plugins[i];
assert(plugin->name != NULL);
assert(*plugin->name != 0);
assert(plugin->open != NULL);
const struct config_param *param =
input_plugin_config(plugin->name, &error);
if (param == NULL && error != NULL) {