Bug 303060 - WalletInterface is synchronous
Summary: WalletInterface is synchronous
Status: RESOLVED FIXED
Alias: None
Product: telepathy
Classification: Unclassified
Component: common-internals (show other bugs)
Version: git-latest
Platform: unspecified Linux
: NOR normal
Target Milestone: 0.5.0
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-05 12:22 UTC by George Kiagiadakis
Modified: 2012-11-09 06:32 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 0.5.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description George Kiagiadakis 2012-07-05 12:22:48 UTC
Apparently the wallet interface opens KWallet in a synchronous way. This allows other events to be processed while waiting for KWallet's reply over dbus and causes weird bugs like this one: https://gist.github.com/3053094

This is most likely the reason why the auth handler fails when connecting multiple accounts at the same time, because handleChannels() is called while some other code is waiting for the wallet to open, and then the wallet is opened again and again with nested calls and it all breaks.

Reproducible: Always
Comment 1 David Edmundson 2012-07-10 14:13:50 UTC
Assigned to me.

Will be adding a new method to WalletManager to explicitly open the wallet. This will return a Tp::PendingOperation (or similar) following the wallet opening process.

SASL authOp will then call this and wait until wallet opens (or fails) before continuing. 

This can't be backported to 0.4, as it requires changing our lib.

Accounts KCM + Auth Handler both need updating.
Comment 2 David Edmundson 2012-11-03 06:48:37 UTC
Git commit cd46494b035c3fa020019db2f6951945bfd63a66 by David Edmundson.
Committed on 08/08/2012 at 15:33.
Pushed by davidedmundson into branch 'model_refactor_1'.

Async wallet usage, using wallet-utils from common internals

Also fix some pointless code when deleting accounts which used to proxy via a model.
This should hopefully fix the crash when removing accounts

REVIEW: 105926
Related: bug 293716

M  +0    -13   KTp/Models/accounts-list-model.cpp
M  +0    -1    KTp/Models/accounts-list-model.h

http://commits.kde.org/telepathy-common-internals/cd46494b035c3fa020019db2f6951945bfd63a66
Comment 3 David Edmundson 2012-11-09 06:32:26 UTC
Git commit 82a26bbaddfd898374b039038e77702575cbe1e7 by David Edmundson.
Committed on 08/08/2012 at 15:33.
Pushed by davidedmundson into branch 'master'.

Async wallet usage, using wallet-utils from common internals

Also fix some pointless code when deleting accounts which used to proxy via a model.
This should hopefully fix the crash when removing accounts

REVIEW: 105926
Related: bug 293716

M  +0    -13   KTp/Models/accounts-list-model.cpp
M  +0    -1    KTp/Models/accounts-list-model.h

http://commits.kde.org/telepathy-common-internals/82a26bbaddfd898374b039038e77702575cbe1e7