From 22277ec675847f73203bf908144f9903d13e2869 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Mon, 13 Feb 2012 15:52:00 +0100 Subject: Fix compile issues when plug-ins are disabled. Commit 1876ccd012e9e2ca6f8e1cd9e7e9bb4bf24ccecb modified plugin_call() and introduced plugin_call_ssl(). But the similar approach was missing for situations without plug-ins. Solution: Rename plugin_call() in the #else !ENABLE_PLUGIN section to plugin_call_ssl(). Then move the plugin_ssl() function inside the #ifdef ENABLE_PLUGIN section outside the #ifdef, making it available for builds with and without plug-ins enabled. Signed-off-by: David Sommerseth Acked-by: Gert Doering --- plugin.h | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'plugin.h') diff --git a/plugin.h b/plugin.h index 948ab88..6f75e27 100644 --- a/plugin.h +++ b/plugin.h @@ -133,20 +133,6 @@ int plugin_call_ssl (const struct plugin_list *pl, #endif ); -static inline int -plugin_call(const struct plugin_list *pl, - const int type, - const struct argv *av, - struct plugin_return *pr, - struct env_set *es) -{ - return plugin_call_ssl(pl, type, av, pr, es -#ifdef USE_SSL - , -1, NULL -#endif - ); -} - void plugin_list_close (struct plugin_list *pl); bool plugin_defined (const struct plugin_list *pl, const int type); @@ -182,7 +168,6 @@ plugin_return_init (struct plugin_return *pr) } #else - struct plugin_list { int dummy; }; struct plugin_return { int dummy; }; @@ -193,7 +178,7 @@ plugin_defined (const struct plugin_list *pl, const int type) } static inline int -plugin_call (const struct plugin_list *pl, +plugin_call_ssl (const struct plugin_list *pl, const int type, const struct argv *av, struct plugin_return *pr, @@ -209,4 +194,18 @@ plugin_call (const struct plugin_list *pl, #endif /* ENABLE_PLUGIN */ +static inline int +plugin_call(const struct plugin_list *pl, + const int type, + const struct argv *av, + struct plugin_return *pr, + struct env_set *es) +{ + return plugin_call_ssl(pl, type, av, pr, es +#ifdef USE_SSL + , -1, NULL +#endif + ); +} + #endif /* OPENVPN_PLUGIN_H */ -- cgit