Re: [Openvpn-devel] [PATCH] Improve error msg when all TAP adapters are in use "or disabled"

2020-10-01 Thread Arne Schwabe
Am 06.08.20 um 21:27 schrieb Selva Nair:
> Hi,
> 
> This looks good but can we do better? We don't check the error
> (GetLastError()) after the CreateFile() failure -- can we determine
> whether the error was due to permissions, busy file (in use) or
> disabled device and print out a more specific error message? I'm not
> sure what errors are triggered by CreateFile, so just wondering..

Since we didn't do better I would suggest we merge the original patch as
it is not adding any extra complexity and improves things.

Acked-By: Arne Schwabe 




signature.asc
Description: OpenPGP digital signature
___
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel


Re: [Openvpn-devel] [PATCH] Improve error msg when all TAP adapters are in use "or disabled"

2020-08-06 Thread Selva Nair
Hi,

This looks good but can we do better? We don't check the error
(GetLastError()) after the CreateFile() failure -- can we determine
whether the error was due to permissions, busy file (in use) or
disabled device and print out a more specific error message? I'm not
sure what errors are triggered by CreateFile, so just wondering..

Selva

On Thu, Aug 6, 2020 at 3:02 PM Richard Bonhomme  wrote:
>
> Ref: https://github.com/OpenVPN/openvpn-gui/issues/356
>
> Signed-off-by: Richard Bonhomme 
> ---
>  src/openvpn/tun.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c
> index cc7b65cf..44ca8450 100644
> --- a/src/openvpn/tun.c
> +++ b/src/openvpn/tun.c
> @@ -6436,7 +6436,7 @@ tun_open_device(struct tuntap *tt, const char 
> *dev_node, const char **device_gui
>
>  if (!*device_guid)
>  {
> -msg(M_FATAL, "All %s adapters on this system are currently 
> in use.", print_windows_driver(tt->windows_driver));
> +msg(M_FATAL, "All %s adapters on this system are currently 
> in use or disabled.", print_windows_driver(tt->windows_driver));
>  }
>
>  if (tt->windows_driver != windows_driver)
> --
> 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


[Openvpn-devel] [PATCH] Improve error msg when all TAP adapters are in use "or disabled"

2020-08-06 Thread Richard Bonhomme
Ref: https://github.com/OpenVPN/openvpn-gui/issues/356

Signed-off-by: Richard Bonhomme 
---
 src/openvpn/tun.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c
index cc7b65cf..44ca8450 100644
--- a/src/openvpn/tun.c
+++ b/src/openvpn/tun.c
@@ -6436,7 +6436,7 @@ tun_open_device(struct tuntap *tt, const char *dev_node, 
const char **device_gui
 
 if (!*device_guid)
 {
-msg(M_FATAL, "All %s adapters on this system are currently in 
use.", print_windows_driver(tt->windows_driver));
+msg(M_FATAL, "All %s adapters on this system are currently in 
use or disabled.", print_windows_driver(tt->windows_driver));
 }
 
 if (tt->windows_driver != windows_driver)
-- 
2.17.1



___
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel