> 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 > >
_______________________________________________ kde-networkmanager mailing list [email protected] https://mail.kde.org/mailman/listinfo/kde-networkmanager
