On Sat, Jun 30, 2018 at 5:49 PM, Antonio Quartulli <a...@unstable.cc> wrote:

> I'd remove the last paragraph and the greetings from the commit message.
> But this might be done at commit time.
>

​It was unclear how to handle "explain what I'm wanting" in one mail.
Sorry.
​

> did you concatenate two patches? or what happened? It seems that the
> part after this is not recognised as proper patch.
>

I think I dropped a few lines from `git format-patch HEAD~1 --stdout`​ on
accident.  Take two:



>From 2f221fe6111572dc897dc91cfd9ad4929df478ec Mon Sep 17 00:00:00 2001
From: Greg Cox <g...@mozilla.com>
Date: Fri, 29 Jun 2018 21:53:54 +0000
Subject: [PATCH] Remove deprecated plugin functions from code samples

---
 sample/sample-plugins/defer/simple.c    | 5 +++--
 sample/sample-plugins/defer/simple.def  | 4 ++--
 sample/sample-plugins/log/log.c         | 6 ++++--
 sample/sample-plugins/simple/simple.c   | 6 ++++--
 sample/sample-plugins/simple/simple.def | 4 ++--
 5 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/sample/sample-plugins/defer/simple.c
b/sample/sample-plugins/defer/simple.c
index
d18695b59d6966e5cc84a19e176ea9ec18d0b452..d55e47be01aa346cfc9c70aa24f8722e5a1d67f9
100644
--- a/sample/sample-plugins/defer/simple.c
+++ b/sample/sample-plugins/defer/simple.c
@@ -131,11 +131,12 @@ atoi_null0(const char *str)
 }

 OPENVPN_EXPORT openvpn_plugin_handle_t
-openvpn_plugin_open_v1(unsigned int *type_mask, const char *argv[], const
char *envp[])
+openvpn_plugin_open_v2(unsigned int *type_mask, const char *argv[], const
char *envp[],
+                       struct openvpn_plugin_string_list **return_list)
 {
     struct plugin_context *context;

-    printf("FUNC: openvpn_plugin_open_v1\n");
+    printf("FUNC: openvpn_plugin_open_v2\n");

     /*
      * Allocate our context
diff --git a/sample/sample-plugins/defer/simple.def
b/sample/sample-plugins/defer/simple.def
index
a87507d1fdc0f0bfd0434de577a818ef0cc62afb..556f362308bc6ce81829253f7a7fae9898be221a
100755
--- a/sample/sample-plugins/defer/simple.def
+++ b/sample/sample-plugins/defer/simple.def
@@ -1,6 +1,6 @@
 LIBRARY   OpenVPN_PLUGIN_SAMPLE
 DESCRIPTION "Sample OpenVPN plug-in module."
 EXPORTS
-   openvpn_plugin_open_v1   @1
-   openvpn_plugin_func_v1   @2
+   openvpn_plugin_open_v2   @1
+   openvpn_plugin_func_v2   @2
    openvpn_plugin_close_v1  @3
diff --git a/sample/sample-plugins/log/log.c
b/sample/sample-plugins/log/log.c
index
ecf62c0e653c8ec852ab641e75363747b795c1af..efa8e5184db34f36a311fb61436cdfd61dd02f78
100644
--- a/sample/sample-plugins/log/log.c
+++ b/sample/sample-plugins/log/log.c
@@ -70,7 +70,8 @@ get_env(const char *name, const char *envp[])
 }

 OPENVPN_EXPORT openvpn_plugin_handle_t
-openvpn_plugin_open_v1(unsigned int *type_mask, const char *argv[], const
char *envp[])
+openvpn_plugin_open_v2(unsigned int *type_mask, const char *argv[], const
char *envp[],
+                       struct openvpn_plugin_string_list **return_list)
 {
     struct plugin_context *context;

@@ -164,7 +165,8 @@ show(const int type, const char *argv[], const char
*envp[])
 }

 OPENVPN_EXPORT int
-openvpn_plugin_func_v1(openvpn_plugin_handle_t handle, const int type,
const char *argv[], const char *envp[])
+openvpn_plugin_func_v2(openvpn_plugin_handle_t handle, const int type,
const char *argv[], const char *envp[],
+                       void *per_client_context, struct
openvpn_plugin_string_list **return_list)
 {
     struct plugin_context *context = (struct plugin_context *) handle;

diff --git a/sample/sample-plugins/simple/simple.c
b/sample/sample-plugins/simple/simple.c
index
950c547e22c1d44c59812eb90606fbdb52981021..66695950abfcbc6ebb0a4d4fa621627a6099ba76
100644
--- a/sample/sample-plugins/simple/simple.c
+++ b/sample/sample-plugins/simple/simple.c
@@ -72,7 +72,8 @@ get_env(const char *name, const char *envp[])
 }

 OPENVPN_EXPORT openvpn_plugin_handle_t
-openvpn_plugin_open_v1(unsigned int *type_mask, const char *argv[], const
char *envp[])
+openvpn_plugin_open_v2(unsigned int *type_mask, const char *argv[], const
char *envp[],
+                       struct openvpn_plugin_string_list **return_list)
 {
     struct plugin_context *context;

@@ -97,7 +98,8 @@ openvpn_plugin_open_v1(unsigned int *type_mask, const
char *argv[], const char *
 }

 OPENVPN_EXPORT int
-openvpn_plugin_func_v1(openvpn_plugin_handle_t handle, const int type,
const char *argv[], const char *envp[])
+openvpn_plugin_func_v2(openvpn_plugin_handle_t handle, const int type,
const char *argv[], const char *envp[],
+                       void *per_client_context, struct
openvpn_plugin_string_list **return_list)
 {
     struct plugin_context *context = (struct plugin_context *) handle;

diff --git a/sample/sample-plugins/simple/simple.def
b/sample/sample-plugins/simple/simple.def
index
a87507d1fdc0f0bfd0434de577a818ef0cc62afb..556f362308bc6ce81829253f7a7fae9898be221a
100755
--- a/sample/sample-plugins/simple/simple.def
+++ b/sample/sample-plugins/simple/simple.def
@@ -1,6 +1,6 @@
 LIBRARY   OpenVPN_PLUGIN_SAMPLE
 DESCRIPTION "Sample OpenVPN plug-in module."
 EXPORTS
-   openvpn_plugin_open_v1   @1
-   openvpn_plugin_func_v1   @2
+   openvpn_plugin_open_v2   @1
+   openvpn_plugin_func_v2   @2
    openvpn_plugin_close_v1  @3
--
2.15.2 (Apple Git-101.1)
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to