Hi,

On Mon, Feb 19, 2018 at 03:26:34PM -0500, selva.n...@gmail.com wrote:
> - In route.c print adapter_index as unsigned int as in the rest
>   of the code.

That one confuses me, but that is most likely me vs. windows types.

adapter_index is declared as "DWORD" in tun.h, and 

  https://msdn.microsoft.com/en-us/library/cc230318.aspx 

says that DWORD is "typedef unsigned long DWORD".

Since that particular code is only relevant on windows, why not just
use "%lu" and avoid the cast?


The rest looks reasonable to me, and I'm not strictly opposed to the
adapter_index one, just confused.

(As a side note, I assume that this patch is "master only", and have
not looked at which bits and pieces apply to release/2.4 - the error.c
one does not, because the surrounding code is different, plus, I've
already merged Steffan's patch for error.c to 2.4)

[..]
> @@ -3003,7 +3003,7 @@ do_route_service(const bool add, const route_message_t 
> *rt, const size_t size, H
>  
>      if (ack.error_number != NO_ERROR)
>      {
> -        msg(M_WARN, "ROUTE: route %s failed using service: %s [status=%u 
> if_index=%lu]",
> +        msg(M_WARN, "ROUTE: route %s failed using service: %s [status=%u 
> if_index=%d]",
>              (add ? "addition" : "deletion"), 
> strerror_win32(ack.error_number, &gc),
>              ack.error_number, rt->iface.index);
>          goto out;

That one is correct, but arguably a bit annoying - openvpn-msg.h / 
struct interface_t uses "int index", which maybe should have been a 
DWORD to keep the windows types.  Or not?

I wouldn't change the message types, though - as it would introduce
possible compatibility issues between openvpn and iservice (if one 
ends up having different versions installed and running).

gert
-- 
now what should I write here...

Gert Doering - Munich, Germany                             g...@greenie.muc.de

Attachment: signature.asc
Description: PGP signature

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to