connman.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Michael Nazzareno Trimarchi <michael@amarulasolutions.com>
To: connman@lists.linux.dev, Daniel Wagner <wagi@monom.org>
Subject: Re: [PATCH] tether: Fix connman_technology_get_wifi_tethering
Date: Sun, 24 Oct 2021 09:45:57 +0200	[thread overview]
Message-ID: <CAOf5uwk_bPAr9u06pkuSz0yS+hanycVHcsxDeKkfTTss4D41zA@mail.gmail.com> (raw)
In-Reply-To: <20211023214953.5606-1-michael@amarulasolutions.com>

Hi

I keep the compatibility. Another option is to give back them all anyway

Michael

On Sat, Oct 23, 2021 at 11:50 PM Michael Trimarchi
<michael@amarulasolutions.com> wrote:
>
> The function is called from tethering, so the tethering is not
> yet enabled. We need to workaround in order to get the right
> value
>
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> ---
>  src/technology.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/src/technology.c b/src/technology.c
> index 97419150..5c469111 100644
> --- a/src/technology.c
> +++ b/src/technology.c
> @@ -367,19 +367,23 @@ bool connman_technology_get_wifi_tethering(const struct connman_technology *tech
>                                         const char **ssid, const char **psk,
>                                         int *freq)
>  {
> +       bool force = true;
> +
>         if (!ssid || !psk)
>                 return false;
>
>         *ssid = *psk = NULL;
>
>         /* Workaround for the neard plugin */
> -       if (!technology)
> +       if (!technology) {
>                 technology = technology_find(CONNMAN_SERVICE_TYPE_WIFI);
> +               force = false;
> +       }
>
>         if (!technology)
>                 return false;
>
> -       if (!technology->tethering)
> +       if (!force && !technology->tethering)
>                 return false;
>
>         *ssid = technology->tethering_ident;
> --
> 2.25.1
>


-- 
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
michael@amarulasolutions.com
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
info@amarulasolutions.com
www.amarulasolutions.com

  reply	other threads:[~2021-10-24  7:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-23 21:49 Michael Trimarchi
2021-10-24  7:45 ` Michael Nazzareno Trimarchi [this message]
2021-10-26  7:05 ` Daniel Wagner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOf5uwk_bPAr9u06pkuSz0yS+hanycVHcsxDeKkfTTss4D41zA@mail.gmail.com \
    --to=michael@amarulasolutions.com \
    --cc=connman@lists.linux.dev \
    --cc=wagi@monom.org \
    --subject='Re: [PATCH] tether: Fix connman_technology_get_wifi_tethering' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).