From dc299b6e7d0413d0a311c33ffb14591b5c8d1d96 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Thu, 6 Jan 2011 23:24:52 +0100 Subject: Separate the general plug-in version constant and v3 plug-in structs version After a review of the second round of the the v3 plug-in implementation, it was decided to use a separate constant defining the version of the structs used for argument and return value passing, instead of OPENVPN_PLUGIN_VERSION. To not make it too complex, this patch uses a shared version constant for all the v3 structures. It is not expected that these strucutures will change too much and too often. Signed-off-by: David Sommerseth Acked-by: James Yonan --- plugin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugin.c') diff --git a/plugin.c b/plugin.c index 03e7df3..56bd37f 100644 --- a/plugin.c +++ b/plugin.c @@ -305,7 +305,7 @@ plugin_open_item (struct plugin *p, struct openvpn_plugin_args_open_return retargs; CLEAR(retargs); - if ((*p->open3)(OPENVPN_PLUGIN_VERSION, &args, &retargs) == OPENVPN_PLUGIN_FUNC_SUCCESS) { + if ((*p->open3)(OPENVPN_PLUGINv3_STRUCTVER, &args, &retargs) == OPENVPN_PLUGIN_FUNC_SUCCESS) { p->plugin_type_mask = retargs.type_mask; p->plugin_handle = retargs.handle; retlist = retargs.return_list; @@ -377,7 +377,7 @@ plugin_call_item (const struct plugin *p, struct openvpn_plugin_args_func_return retargs; CLEAR(retargs); - status = (*p->func3)(OPENVPN_PLUGIN_VERSION, &args, &retargs); + status = (*p->func3)(OPENVPN_PLUGINv3_STRUCTVER, &args, &retargs); retlist = retargs.return_list; } else if (p->func2) status = (*p->func2)(p->plugin_handle, type, (const char **)a.argv, envp, per_client_context, retlist); -- cgit