Re: [Openvpn-devel] [PATCH] Handle ctrl-C and ctrl-break events on Windows

2015-11-13 Thread Selva Nair
Hi, On Fri, Nov 13, 2015 at 2:36 PM, Gert Doering wrote: > On Wed, Nov 11, 2015 at 02:46:10PM -0500, Selva Nair wrote: > [..] >> Tested on windows 7 with cmd-line use and start/stop with nssm. For nssm, >> the default >> delay after ctrl-C is 1500 msec which is not enough for the process to exit

Re: [Openvpn-devel] [PATCH] Handle ctrl-C and ctrl-break events on Windows

2015-11-13 Thread Gert Doering
Hi, On Wed, Nov 11, 2015 at 02:46:10PM -0500, Selva Nair wrote: > > With nssm, the console is shared with nssm, so ctrl-C is delivered as > > a signal. I'll send a patch handling both cases. > > The patch is in the next email. > > Handling the key-board input is easy, but making the callback in

Re: [Openvpn-devel] [PATCH] Do not hard-code windows systemroot in env_block

2015-11-13 Thread Gert Doering
Hi, On Fri, Nov 13, 2015 at 10:34:49AM -0500, Selva Nair wrote: > On Fri, Nov 13, 2015 at 10:27 AM, Gert Doering wrote: > >> However, if the user specifies --win-sys some_cruft, win_sys_path will > >> get set to that "some_cruft" (in options.c). User is the king. > > > > Yes. In this case, I do

[Openvpn-devel] [PATCH applied] Re: Do not hard-code windows systemroot in env_block

2015-11-13 Thread Gert Doering
ACK, and thanks again for cleaning up my sloppy code :-) Your patch has been applied to the master and release/2.3 branch. commit 7546cba4761b24f2195034dcd3407aecd43fd3be (master) commit 9f87007d8997d8127b9ea5fb0cb6b6cb9c88a4f3 (release/2.3) Author: Selva Nair List-Post: openvpn-devel@lists.sour

Re: [Openvpn-devel] [PATCH] Do not hard-code windows systemroot in env_block

2015-11-13 Thread Selva Nair
Hi, On Fri, Nov 13, 2015 at 10:27 AM, Gert Doering wrote: >> >> However, if the user specifies --win-sys some_cruft, win_sys_path will >> get set to that "some_cruft" (in options.c). User is the king. > > Yes. In this case, I do not worry at all - "you get what you ask for". In the current setu

Re: [Openvpn-devel] [PATCH] Do not hard-code windows systemroot in env_block

2015-11-13 Thread Gert Doering
Hi, On Fri, Nov 13, 2015 at 10:21:12AM -0500, Selva Nair wrote: > > OTOH, I'm not sure if this is going to work - win_sys_path is (unless > > set from options.c) initialized via > > > > GetEnvironmentVariable (SYS_PATH_ENV_VAR_NAME, buf, sizeof(buf) > > set_win_sys_path (buf, es); > > > > ...

Re: [Openvpn-devel] [PATCH] Do not hard-code windows systemroot in env_block

2015-11-13 Thread Selva Nair
On Fri, Nov 13, 2015 at 2:38 AM, Gert Doering wrote: > Hi, > > On Thu, Nov 12, 2015 at 09:41:27PM -0500, Selva Nair wrote: >> FWIW, fixes trac #500 >> >> Signed-off-by: Selva Nair >> --- >> src/openvpn/win32.c | 7 ++- >> 1 file changed, 6 insertions(+), 1 deletion(-) >> ... > Cool :-) > > T

[Openvpn-devel] [PATCH applied] Re: Use adapter index instead of name

2015-11-13 Thread Gert Doering
ACK, and thanks for your patience. Your patch has been applied to the master and release/2.3 branch. I have reformatted and updated the commit message a bit for readability, and added a NOTE: about the temporary variable. commit efeaf947c9c5c88d77d16ac4917c1350c447c8dc (master) commit e2afbdb613

Re: [Openvpn-devel] [PATCH v3] Use adapter index instead of name

2015-11-13 Thread Gert Doering
Hi, On Wed, Nov 11, 2015 at 08:40:06PM +0100, Gert Doering wrote: > ... but wouldn't > > argv_printf (&argv, > "%s%sc interface ipv6 set address interface=%lu %s > store=active", >get_win_sys_path(), >NETSH_PATH_SUFFIX, >

Re: [Openvpn-devel] [PATCH] Do not hard-code windows systemroot in env_block

2015-11-13 Thread Gert Doering
Hi, On Thu, Nov 12, 2015 at 09:41:27PM -0500, Selva Nair wrote: > FWIW, fixes trac #500 > > Signed-off-by: Selva Nair > --- > src/openvpn/win32.c | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/src/openvpn/win32.c b/src/openvpn/win32.c > index 7c89a5a..d06b41f 10

[Openvpn-devel] [PATCH] Do not hard-code windows systemroot in env_block

2015-11-13 Thread Selva Nair
FWIW, fixes trac #500 Signed-off-by: Selva Nair --- src/openvpn/win32.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/openvpn/win32.c b/src/openvpn/win32.c index 7c89a5a..d06b41f 100644 --- a/src/openvpn/win32.c +++ b/src/openvpn/win32.c @@ -763,7 +763,12 @@ win_s