Hi On Wed, Sep 2, 2020 at 9:39 AM Lev Stipakov <lstipa...@gmail.com> wrote:
> From: Lev Stipakov <l...@openvpn.net> > > For some users renaming adapter mysteriously fails > (https://github.com/OpenVPN/openvpn-build/issues/187), > > Since renaming is just a a "nice to have", make it not fatail. > > Signed-off-by: Lev Stipakov <l...@openvpn.net> > --- > src/openvpnmsica/openvpnmsica.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/openvpnmsica/openvpnmsica.c > b/src/openvpnmsica/openvpnmsica.c > index 31e90bd2..d5b3f09e 100644 > --- a/src/openvpnmsica/openvpnmsica.c > +++ b/src/openvpnmsica/openvpnmsica.c > @@ -1100,7 +1100,8 @@ ProcessDeferredAction(_In_ MSIHANDLE hInstall) > dwResult = tap_set_adapter_name(&guidAdapter, szName); > if (dwResult != ERROR_SUCCESS) > { > - tap_delete_adapter(NULL, &guidAdapter, > &bRebootRequired); > + /* failed renaming is not a fatal error, continue */ > + dwResult = ERROR_SUCCESS; > This looks strange. If we are going to rewrite dwResult, why set it and check it at all, just call tap_set_adapter() without storing the return value and add the comment. Or, better, print a warning message saying the rename failed. Selva > } > } > } > -- > 2.17.1 > > > > _______________________________________________ > Openvpn-devel mailing list > Openvpn-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/openvpn-devel >
_______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel