[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix fix false positive "Misconfiguration in the phone table
From: |
Ladislav Michl |
Subject: |
Re: [PATCH] Fix fix false positive "Misconfiguration in the phone table detected." |
Date: |
Sat, 21 Nov 2020 10:06:36 +0100 |
On Sat, Nov 21, 2020 at 09:35:43AM +0100, Daniele Forsi wrote:
> Hello Ladislav,
>
> thank you for your work on gnokii.
>
> > Fixes: 760f9f070 ("Fix false positive "Misconfiguration in the phone table
> > detected."")
>
> this patch should be rejected because the code works as intended, for
> a too lengthy :-) explanation see below.
>
> Did you test this change? Please don't change the code that you can test.
Yes, I was able at least to read something on C2-OO, but still working
on full support.
> > error = NK6510_GetSMSFolders_S40_30(data, state);
> > - if (error == GN_ERR_NONE) {
> > + if (error) {
> > dprintf("Misconfiguration in the phone table
> > detected.\nPlease report to gnokii ml (gnokii-users@nongnu.org).\n");
> > dprintf("Model %s (%s) is series40 3rd+
> > Edition.\n", DRVINSTANCE(state)->pm->product_name,
> > DRVINSTANCE(state)->pm->model);
> > DRVINSTANCE(state)->pm->flags |= PM_DEFAULT_S40_3RD;
>
> that logic is also present in other parts of that source file and
> handles situations like this:
> 1) user owns a Series 40 3rd Edition phone (I tested this with a Nokia
> 5300 at that time, not today)
> 2) user configured gnokii with model=6510 (which works form most
> commands also for Series 40 3rd)
> 3) user issued a command that resulted in a call to GetSMSFolders
> which sent the nk6510 FBUS command to the phone
> 4) that FBUS command was NOT handled by the phone in use and it
> returned an error
> 5) then libgnokii tried the series40 FBUS command that succeeded (so
> the check error == GN_ERR_NONE is correct)
> 6) libgnokii asked the user to report something to this mailing list
> so tha we could add the flag PM_DEFAULT_S40_3RD for that phone in the
> next version of libgnokii, this will result in a slightly faster
> execution of the command and reduces the chance of unintended side
> effects
>
> I think that the user can add the flag DEFAULT_S40_3RD in the [flags]
> section of its copy of gnokiirc since libgnokii 0.6.30 to avoid
> triggering this logic
Ah! Then I'm suggesting to add a little comment like that above such
checks :)
I'll of course do the suggested and drop this patch.
Thank you!
ladis
> --
> Daniele Forsi