summaryrefslogtreecommitdiffstats
path: root/plugin.h
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2012-02-13 15:52:00 +0100
committerDavid Sommerseth <davids@redhat.com>2012-02-13 17:15:24 +0100
commit22277ec675847f73203bf908144f9903d13e2869 (patch)
tree728776167a719786ff24869789f28fd6a0b5bda9 /plugin.h
parent71bbbd76c62630c88441237d72fe5b61f0b45b2a (diff)
downloadopenvpn-22277ec675847f73203bf908144f9903d13e2869.tar.gz
openvpn-22277ec675847f73203bf908144f9903d13e2869.tar.xz
openvpn-22277ec675847f73203bf908144f9903d13e2869.zip
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 <davids@redhat.com> Acked-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'plugin.h')
-rw-r--r--plugin.h31
1 files changed, 15 insertions, 16 deletions
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 */