From c8b285ebdbeb0530d0373713519b0c841fd93a12 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Thu, 30 Jul 2009 17:34:24 +0200 Subject: [PATCH] src/plugin.c: Warn if plugin_register_*() overwrites an existing callback. --- src/plugin.c | 4 ++++ 1 file changed, 4 insertions(+) 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); } -- 2.11.0