Hi Grant,

On Wed, May 25, 2011 at 12:43:06AM -0700, Grant Erickson wrote:
> When removing a network DHCP configuration, invalidate the DHCP
> configuration in addition to releasing it.
> 
> This addresses a case in which a lower-level network event (e.g. Wi-Fi
> disassociation triggered by the driver due to low signal strength)
> causes a service disconnect not triggered by connman but then is
> recovered BY connman to reuse the prior DHCP lease configuration but
> not actually assign it by simply invalidating the old lease
> configuration when connman removes the prior network.
Looks mostly good to me, I just have a couple of nitpicks:


> ---
>  src/dhcp.c |   44 +++++++++++++++++++++++++++++++++++---------
>  1 files changed, 35 insertions(+), 9 deletions(-)
> 
> diff --git a/src/dhcp.c b/src/dhcp.c
> index 03a2b90..e188275 100644
> --- a/src/dhcp.c
> +++ b/src/dhcp.c
> @@ -50,6 +50,11 @@ static GHashTable *network_table;
>  
>  static void dhcp_free(struct connman_dhcp *dhcp)
>  {
> +     DBG("dhcp %p", dhcp);
> +
> +     if (dhcp == NULL)
> +             return;
> +
All of those dhcp check are unrelated to this patch. Please provide an
additional patch for them.


> @@ -412,9 +437,12 @@ static void remove_network(gpointer user_data)
>  
>       DBG("dhcp %p", dhcp);
>  
> +     if (dhcp == NULL)
> +             return;
> +
If the hash lookup fails, remove_network() will not be called. So this check is
unneeded.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to