author | Florian Forster <octo@collectd.org> | |
Sat, 25 May 2013 07:46:36 +0000 (09:46 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Sat, 25 May 2013 07:46:36 +0000 (09:46 +0200) | ||
commit | a20170e17bb930f4004156c7d6f634a57a7b57bb | |
tree | 375fdfbd9d76fafa6eaf4eaf6a2b05ae721dd9fc | tree | snapshot |
parent | 94a1816eb0fe9291ccfb966d15eb646e93086368 | commit | diff |
src/plugin.c: Make plugin_load() idempotent, i.e. don't load plugins twice.
Previously, multiple 'LoadPlugin "foo"' lines would dlopen the same .so file
twice and call its module_register function twice. This would eventually result
in complaints about callbacks with the same name being registered. With this
patch each plugin is only loaded only once, allowing people to write "self
contained" configuration segments.
Thanks to Tim Bunce for suggesting this!
Github: #333
Previously, multiple 'LoadPlugin "foo"' lines would dlopen the same .so file
twice and call its module_register function twice. This would eventually result
in complaints about callbacks with the same name being registered. With this
patch each plugin is only loaded only once, allowing people to write "self
contained" configuration segments.
Thanks to Tim Bunce for suggesting this!
Github: #333
src/plugin.c | diff | blob | history |