Code

src/plugin.c: Make plugin_load() idempotent, i.e. don't load plugins twice.
authorFlorian Forster <octo@collectd.org>
Sat, 25 May 2013 07:46:36 +0000 (09:46 +0200)
committerFlorian Forster <octo@collectd.org>
Sat, 25 May 2013 07:46:36 +0000 (09:46 +0200)
commita20170e17bb930f4004156c7d6f634a57a7b57bb
tree375fdfbd9d76fafa6eaf4eaf6a2b05ae721dd9fc
parent94a1816eb0fe9291ccfb966d15eb646e93086368
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
src/plugin.c