Browse code

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>

David Sommerseth authored on 2012/02/13 23:52:00
Showing 1 changed files
... ...
@@ -133,20 +133,6 @@ int plugin_call_ssl (const struct plugin_list *pl,
133 133
 #endif
134 134
 		);
135 135
 
136
-static inline int
137
-plugin_call(const struct plugin_list *pl,
138
-	const int type,
139
-	const struct argv *av,
140
-	struct plugin_return *pr,
141
-	struct env_set *es)
142
-{
143
-  return plugin_call_ssl(pl, type, av, pr, es
144
-#ifdef USE_SSL
145
-      , -1, NULL
146
-#endif
147
-      );
148
-}
149
-
150 136
 void plugin_list_close (struct plugin_list *pl);
151 137
 bool plugin_defined (const struct plugin_list *pl, const int type);
152 138
 
... ...
@@ -182,7 +168,6 @@ plugin_return_init (struct plugin_return *pr)
182 182
 }
183 183
 
184 184
 #else
185
-
186 185
 struct plugin_list { int dummy; };
187 186
 struct plugin_return { int dummy; };
188 187
 
... ...
@@ -193,7 +178,7 @@ plugin_defined (const struct plugin_list *pl, const int type)
193 193
 }
194 194
 
195 195
 static inline int
196
-plugin_call (const struct plugin_list *pl,
196
+plugin_call_ssl (const struct plugin_list *pl,
197 197
 	     const int type,
198 198
 	     const struct argv *av,
199 199
 	     struct plugin_return *pr,
... ...
@@ -209,4 +194,18 @@ plugin_call (const struct plugin_list *pl,
209 209
 
210 210
 #endif /* ENABLE_PLUGIN */
211 211
 
212
+static inline int
213
+plugin_call(const struct plugin_list *pl,
214
+	const int type,
215
+	const struct argv *av,
216
+	struct plugin_return *pr,
217
+	struct env_set *es)
218
+{
219
+  return plugin_call_ssl(pl, type, av, pr, es
220
+#ifdef USE_SSL
221
+      , -1, NULL
222
+#endif
223
+      );
224
+}
225
+
212 226
 #endif /* OPENVPN_PLUGIN_H */