Code

src/plugin.c: Warn if plugin_register_*() overwrites an existing callback.
authorSebastian Harl <sh@tokkee.org>
Thu, 30 Jul 2009 15:34:24 +0000 (17:34 +0200)
committerSebastian Harl <sh@tokkee.org>
Tue, 8 Dec 2009 20:13:40 +0000 (21:13 +0100)
src/plugin.c

index 5ca009c446f9a268005014fb110a4ab80a20d250..182892a94bcea3343dbd7c067676168d4d62a7b2 100644 (file)
@@ -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);
        }