[PATCH 04/12] service: adding a function to know the connected state of an ipconfig

Daniel Wagner wagi at monom.org
Thu Feb 9 07:24:11 PST 2012


Hi Tomasz,

On 08.02.2012 15:13, Tomasz Bursztyka wrote:
> +connman_bool_t __connman_service_is_connected_state(struct connman_service *service,
> +					enum connman_ipconfig_type type)
> +{
> +	if (service == NULL)
> +		return FALSE;
> +
> +	switch (type) {
> +	case CONNMAN_IPCONFIG_TYPE_IPV4:
> +		return is_connected_state(service, service->state_ipv4);
> +	case CONNMAN_IPCONFIG_TYPE_IPV6:
> +		return is_connected_state(service, service->state_ipv6);
> +	case CONNMAN_IPCONFIG_TYPE_UNKNOWN:
> +	default:
> +		break;
> +	}

As pointed out in the other mail, I think you should add the default label.

cheers,
daniel



More information about the connman mailing list