From: Sebastian Harl Date: Thu, 30 Jul 2009 15:34:24 +0000 (+0200) Subject: src/plugin.c: Warn if plugin_register_*() overwrites an existing callback. X-Git-Tag: collectd-4.9.0~18 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=c8b285ebdbeb0530d0373713519b0c841fd93a12;p=collectd.git src/plugin.c: Warn if plugin_register_*() overwrites an existing callback. --- diff --git a/src/plugin.c b/src/plugin.c index 5ca009c4..182892a9 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -210,6 +210,10 @@ static int register_callback (llist_t **list, /* {{{ */ old_cf = le->value; le->value = cf; + WARNING ("plugin: register_callback: " + "a callback named `%s' already exists - " + "overwriting the old entry!", name); + destroy_callback (old_cf); sfree (key); }