[PATCH 05/12] session: do not notify ipconfig content if it's not in a connected state

Daniel Wagner wagi at monom.org
Thu Feb 9 07:26:48 PST 2012


Hi Tomasz,

if you are confused on the ordering of responses you get from me, you
are not alone. I should write the final mail after the complete review...

On 08.02.2012 15:13, Tomasz Bursztyka wrote:
> ---
>  src/session.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/src/session.c b/src/session.c
> index 04cc972..ab44813 100644
> --- a/src/session.c
> +++ b/src/session.c
> @@ -341,6 +341,10 @@ static void append_ipconfig_ipv4(DBusMessageIter *iter, void *user_data)
>  	if (service == NULL)
>  		return;
>  
> +	if (__connman_service_is_connected_state(service,
> +				CONNMAN_IPCONFIG_TYPE_IPV4) == FALSE)
> +		return;
> +

Preferred style is to have multi line if conditions with braces round
the body.

if (...
	...) {

}



>  	ipconfig_ipv4 = __connman_service_get_ip4config(service);
>  	if (ipconfig_ipv4 == NULL)
>  		return;
> @@ -356,6 +360,10 @@ static void append_ipconfig_ipv6(DBusMessageIter *iter, void *user_data)
>  	if (service == NULL)
>  		return;
>  
> +	if (__connman_service_is_connected_state(service,
> +				CONNMAN_IPCONFIG_TYPE_IPV6) == FALSE)
> +		return;
> +

same here

cheers,
daniel



More information about the connman mailing list