Re: [Openvpn-devel] [PATCH v2] openvpnserv: Add support for multi-instances

2017-12-03 Thread Selva Nair
Hi Simon, IIRC, this patch is waiting for a new version to take care of the static const as agreed below: On Thu, Nov 9, 2017 at 11:12 AM, Selva wrote: > Hi Simon, > > On Thu, Nov 9, 2017 at 3:33 AM, Simon Rozman wrote: > >> Hi, >> >> > But then making the variable static just to keep a valid

Re: [Openvpn-devel] [PATCH v2] openvpnserv: Add support for multi-instances

2017-11-09 Thread Gert Doering
Hi, (haven't read the rest of the thread yet, but this one caught my eye) On Thu, Nov 09, 2017 at 11:12:25AM -0500, Selva wrote: > Now try to convince Gert that this belongs to 2.4 :) Well... where would the incentive be to upgrade to 2.5, if we put all the nice stuff into 2.4...? Jokes aside,

Re: [Openvpn-devel] [PATCH v2] openvpnserv: Add support for multi-instances

2017-11-09 Thread Selva
Hi Simon, On Thu, Nov 9, 2017 at 3:33 AM, Simon Rozman wrote: > Hi, > > > But then making the variable static just to keep a valid pointer beyond > the > > current block local looks like a kludge. For me seeing static applied to > a > > variable scoped to a block is just confusing and unusual st

Re: [Openvpn-devel] [PATCH v2] openvpnserv: Add support for multi-instances

2017-11-09 Thread Simon Rozman
Hi, > But then making the variable static just to keep a valid pointer beyond the > current block local looks like a kludge. For me seeing static applied to a > variable scoped to a block is just confusing and unusual style. Think of > this: if > you remove that static the code may still build an

Re: [Openvpn-devel] [PATCH v2] openvpnserv: Add support for multi-instances

2017-11-08 Thread Selva
Hi > > > > +static const SERVICE_TABLE_ENTRY > > > + dispatchTable_automatic[] = { > > > +{ TEXT(""), ServiceStartAutomaticOwn }, > > > +{ NULL, NULL } > > > +}; > > > > Agreed this array has to live beyond the for loop, but

Re: [Openvpn-devel] [PATCH v2] openvpnserv: Add support for multi-instances

2017-11-08 Thread Simon Rozman
Hi, > >  static SERVICE_STATUS_HANDLE service; -static SERVICE_STATUS status; > > +static SERVICE_STATUS status = { SERVICE_WIN32_SHARE_PROCESS }; > > While this is correct, making use of C99's designated init like > >       {.dwServiceType = SERVICE_WIN32_SHARE_PROCESS} would be better > and cl

Re: [Openvpn-devel] [PATCH v2] openvpnserv: Add support for multi-instances

2017-11-06 Thread Selva
Hi, On Sun, Nov 5, 2017 at 5:37 PM, Simon Rozman wrote: > > While openvpn.exe can run multiple concurrent processes, openvpnserv.exe > is usually only one single globally unique running process. > > This patch extends openvpnserv.exe to support multiple service instances > in parallel allowing si

[Openvpn-devel] [PATCH v2] openvpnserv: Add support for multi-instances

2017-11-05 Thread Simon Rozman
While openvpn.exe can run multiple concurrent processes, openvpnserv.exe is usually only one single globally unique running process. This patch extends openvpnserv.exe to support multiple service instances in parallel allowing side-by-side OpenVPN installations. Alternate instances must be instal