Hi Tomasz,
On pe, 2014-03-21 at 14:05 +0200, Tomasz Bursztyka wrote:
> P2P is not tight to any devices, thus the need of automatically
> triggering the proper enabling/disabling function which will in turn
> send the signal about Powered being changed accordingly.
> ---
> src/technology.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/src/technology.c b/src/technology.c
> index 63b7067..e1609c4 100644
> --- a/src/technology.c
> +++ b/src/technology.c
> @@ -704,6 +704,10 @@ static int technology_enable(struct connman_technology
> *technology)
> DBG("technology %p enable", technology);
>
> __sync_synchronize();
> +
> + if (technology->type == CONNMAN_SERVICE_TYPE_P2P)
> + return technology_enabled(technology);
I think we need to check whether the wifi technology is enabled before
enabling p2p technology.
> +
> if (technology->enabled)
> return -EALREADY;
>
> @@ -745,6 +749,10 @@ static int technology_disable(struct connman_technology
> *technology)
> DBG("technology %p disable", technology);
>
> __sync_synchronize();
> +
> + if (technology->type == CONNMAN_SERVICE_TYPE_P2P)
> + return technology_disabled(technology);
> +
> if (!technology->enabled)
> return -EALREADY;
>
Cheers,
Jukka
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman