On Mon 16.04.18 16:46, Daniel Wagner wrote:
On 04/11/2018 04:00 PM, Christian Spielberger wrote:
>Add function connman_inet_is_ifup() which checks if an interface is up. It will
>be used when initializing ACD.
> include/inet.h | 1 +
> src/inet.c | 34 ++++++++++++++++++++++++++++++++++
> 2 files changed, 35 insertions(+)
>diff --git a/include/inet.h b/include/inet.h
>index 6482934..9c1918f 100644
>@@ -38,6 +38,7 @@ char *connman_inet_ifname(int index);
> int connman_inet_ifup(int index);
> int connman_inet_ifdown(int index);
>+bool connman_inet_is_ifup(int index);
Since the all the other connman_inet do return an integer as return value I
suggest you stay consistent and use also an int as return code. The
connman_inet_*() function with a bool as return are expected to be used in a
condition. So this is about consistency/style. Nothing really wrong with
sorry for the long delay. Today I found some time to proceed with the ACD
patches. Here is the first question about your last comments.
Do you mean, it should return 0 for "The interface is down.", 1 for "The
interface is up." and a negative value in case of an error?