Hi Arron,
On Mon, Aug 29, 2011 at 03:48:40AM -0400, Yu A Wang wrote:
> Fix unable to enable/disable 3G service after unplug/plug in again
>
> Fix BMC#13547
> ---
> src/technology.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/technology.c b/src/technology.c
> index a067d68..187d2f0 100644
> --- a/src/technology.c
> +++ b/src/technology.c
> @@ -750,6 +750,7 @@ int __connman_technology_remove_device(struct
> connman_device *device)
> DBG("device %p", device);
>
> type = __connman_device_get_service_type(device);
> + __connman_notifier_disable(type);
This one makes sense to me, although I think we should handle that from
__connman_notifier_unregister(). A type unregistration should trigger a type
disablement first.
Let's keep it like this for now though.
> @@ -759,8 +760,8 @@ int __connman_technology_remove_device(struct
> connman_device *device)
> technology->device_list = g_slist_remove(technology->device_list,
> device);
> if (technology->device_list == NULL) {
> - technology->state = CONNMAN_TECHNOLOGY_STATE_OFFLINE;
> - state_changed(technology);
> + technology->refcount = 1;
> + technology_put(technology);
Yes, you may be missing an rfkill event when you remove the device. That means
you need to call __connman_technology_remove_rfkill() from
__connman_technology_remove_device(). If we got an rfkill event before it,
then the index will not be part of the hash table anymore. Otherwise, your
additional call will remove it properly, and the refcount will be decreased.
If your technology is still not removed after that, then we have a refcount
leak that we need to track down.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman