Review Request 120313: Do not keep trying to open KWallet if we failed before

Jan Grulich jgrulich at redhat.com
Mon Sep 22 11:45:34 UTC 2014



> On Zář. 22, 2014, 11:40 dop., Lamarque Souza wrote:
> > kded/secretagent.cpp, line 259
> > <https://git.reviewboard.kde.org/r/120313/diff/1/?file=314383#file314383line259>
> >
> >     Why not just do the following in this line?
> >     
> >     int i = 0;
> >     while (i < m_calls.size()) {
> >         SecretsRequest &request = m_calls[i];
> >         sendError(SecretAgent::InternalError, QLatin1String("KWallet could not be opened"), request.message);
> >         m_calls.removeAt(i);
> >         ++i;
> >     }
> >     walletClosed();
> >     
> >     I do not see a reason to keep requests in m_calls if they cannot be processed and we should show user what is causing requests to fail. Besides, if kwallet is only temporarily failing your implementation will prevent the secret agent from trying to open wallet until kded is restarted.

Check the pushed fix, the patch looks different here on reviewboard and it's quite confusing. All m_calls will be processed, because once I know that KWallet failed to be open before, then I'm not trying to open it again and continue. In case of processGetSecrets it will show a password dialog. Also the openKWalletFailed flag is set again to false after I use it so it doesn't prevent from trying to open KWallet again.


- Jan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120313/#review67182
-----------------------------------------------------------


On Zář. 22, 2014, 11:38 dop., Jan Grulich wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120313/
> -----------------------------------------------------------
> 
> (Updated Zář. 22, 2014, 11:38 dop.)
> 
> 
> Review request for Network Management, Lukáš Tinkl and Lamarque Souza.
> 
> 
> Repository: plasma-nm
> 
> 
> Description
> -------
> 
> In the secret agent, if any of functions for processing secrets fails to open KWallet, then m_wallet will be always set to 0, which leads again to another attempt to open KWallet. We should check if opening of KWallet failed before and do not try to open it again, which should be done in my patch.
> 
> BUG: https://bugs.kde.org/show_bug.cgi?id=339223
> 
> 
> Diffs
> -----
> 
>   kded/secretagent.h a438191 
>   kded/secretagent.cpp 77438ca 
> 
> Diff: https://git.reviewboard.kde.org/r/120313/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jan Grulich
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-networkmanager/attachments/20140922/f94396af/attachment-0001.html>


More information about the kde-networkmanager mailing list