]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fix compile issues when plug-ins are disabled.
authorDavid Sommerseth <davids@redhat.com>
Mon, 13 Feb 2012 14:52:00 +0000 (15:52 +0100)
committerDavid Sommerseth <davids@redhat.com>
Mon, 13 Feb 2012 16:15:24 +0000 (17:15 +0100)
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>
plugin.h

index 948ab88d55614c5731084b34967a6dcf57ddd2ec..6f75e27fdec0e42944cc843c10870e3d9341e34e 100644 (file)
--- 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 */