[PATCH 1/1] Set network associating as FALSE at function pan_disconnect()

Xu, Martin martin.xu at intel.com
Wed Apr 28 03:26:38 PDT 2010


Marcel:
This patch is used to fix show blocker bug Bug 170 - Switch offline mode, the BT technologies ( BT USB dangle of Cambridge Silicon Radio) fail to be disabled/enabled. http://bugs.meego.com/show_bug.cgi?id=170

The root cause of the bug is that: without the patch,  connman_network_set_connect() takes the normal disconnect as connecting failure, and call network_disconnect again, which lead to endless loop, and ConnMan hangs. 

Please review it. Thanks.

> -----Original Message-----
> From: Xu, Martin
> Sent: Wednesday, April 28, 2010 6:26 PM
> To: connman at connman.net
> Cc: Xu, Martin
> Subject: [PATCH 1/1] Set network associating as FALSE at function
> pan_disconnect()
> 
> From: Martin Xu <martin.xu at intel.com>
> 
> Otherwise, connman_network_set_connected() takes normal service
> disconnect as connecting failure.
> ---
>  plugins/bluetooth.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/plugins/bluetooth.c b/plugins/bluetooth.c
> index fabc75f..4533d7a 100644
> --- a/plugins/bluetooth.c
> +++ b/plugins/bluetooth.c
> @@ -237,6 +237,8 @@ static int pan_disconnect(struct connman_network
> *network)
> 
>  	connman_network_ref(network);
> 
> +	connman_network_set_associating(network, FALSE);
> +
>  	dbus_pending_call_set_notify(call, disconnect_reply, network, NULL);
> 
>  	dbus_message_unref(message);
> --
> 1.6.1.3




More information about the connman mailing list