Re: [Openvpn-devel] [PATCH v4] push-peer-info: rearrange function generating peer info

2022-09-26 Thread Gert Doering
Hi, On Mon, Sep 26, 2022 at 08:46:50AM +0200, Antonio Quartulli wrote: > On 26/09/2022 08:39, Gert Doering wrote: > > It might seem elegant, to do this with a fall-through switch/case, but > > it turns out to be not very elegant due to the restrictions on local > > variables. Also, if someone

Re: [Openvpn-devel] [PATCH v4] push-peer-info: rearrange function generating peer info

2022-09-26 Thread Antonio Quartulli
Hi, On 26/09/2022 08:39, Gert Doering wrote: Hi, On Mon, Sep 26, 2022 at 12:13:57AM +0200, Antonio Quartulli wrote: For now I will just remove the brackets from case 2, where they are not needed. TBH, I think we should just not use switch/case here. It might seem elegant, to do this with a

Re: [Openvpn-devel] [PATCH v4] push-peer-info: rearrange function generating peer info

2022-09-26 Thread Gert Doering
Hi, On Mon, Sep 26, 2022 at 12:13:57AM +0200, Antonio Quartulli wrote: > For now I will just remove the brackets from case 2, where they are not > needed. TBH, I think we should just not use switch/case here. It might seem elegant, to do this with a fall-through switch/case, but it turns out

Re: [Openvpn-devel] [PATCH v4] push-peer-info: rearrange function generating peer info

2022-09-25 Thread Antonio Quartulli
Hi, On 20/09/2022 21:57, Selva Nair wrote: On Tue, Sep 20, 2022 at 3:26 PM Antonio Quartulli > wrote: Hi, On 20/09/2022 18:42, Gert Doering wrote: > Hi, > > On Mon, Sep 19, 2022 at 12:06:18AM +0200, Antonio Quartulli wrote: >> +   

Re: [Openvpn-devel] [PATCH v4] push-peer-info: rearrange function generating peer info

2022-09-20 Thread Selva Nair
On Tue, Sep 20, 2022 at 3:26 PM Antonio Quartulli wrote: > Hi, > > On 20/09/2022 18:42, Gert Doering wrote: > > Hi, > > > > On Mon, Sep 19, 2022 at 12:06:18AM +0200, Antonio Quartulli wrote: > >> +switch (session->opt->push_peer_info_detail) > >> { > >> -/* push version */ > >>

Re: [Openvpn-devel] [PATCH v4] push-peer-info: rearrange function generating peer info

2022-09-20 Thread Antonio Quartulli
Hi, On 20/09/2022 18:42, Gert Doering wrote: Hi, On Mon, Sep 19, 2022 at 12:06:18AM +0200, Antonio Quartulli wrote: +switch (session->opt->push_peer_info_detail) { -/* push version */ -buf_printf(, "IV_VER=%s\n", PACKAGE_VERSION); +case 3: +{ ... +