[Kde-pim] Review Request 112062: wait until the akonadiserver is ready

Guy Maurel guy-kde at maurel.de
Wed Aug 14 16:19:54 BST 2013



> On Aug. 13, 2013, 9:44 p.m., Kevin Krammer wrote:
> > akonadi/agentmanager.cpp, line 319
> > <http://git.reviewboard.kde.org/r/112062/diff/1/?file=178927#file178927line319>
> >
> >     And I think it is something different entirely. invoking the destructor will not free the memory, that is what the delete operator does after invoking the destructor.
> >     Also it seems to be premature, if it is valid why delete it?

mManager muss be deleted before exiting the loop: at a "break" or at the end of the loop.


- Guy


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112062/#review37731
-----------------------------------------------------------


On Aug. 13, 2013, 5:04 p.m., Guy Maurel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112062/
> -----------------------------------------------------------
> 
> (Updated Aug. 13, 2013, 5:04 p.m.)
> 
> 
> Review request for KDEPIM-Libraries, Dan Vrátil, Kevin Krammer, and Volker Krause.
> 
> 
> Description
> -------
> 
> "Bug 321186 - kmail doesn't filter the message, once a month".
> It is NOT a filter bug. 
> It is a synchronisation bug.
> 
> The first akonadi_agent which is started, lauches the akonadiserver.
> It takes a little time until the akonadiserver is "ready".
> If the client is too quick, the call to get a new 
>    org::freedesktop::Akonadi::AgentManager( ServerManager::serviceName( ServerManager::Control ),
> 
> doesn't give a valid manager.
> And the agent is going on...
> 
> In the case of akonadi_mailfilter_agent, the connection to get data for a filter rule <any header>
> doesn't work. The filter doesn't work. 
> 
> My proposal:
> A test-loop with a sleep( 1 ) until the manager is valid.
> At the most times, it takes about 2 - 3 seconds to become a valid manager.
> Using a DSL-Router at home, it could take much more, until the router is on. 
> I modify kdebug.cpp to get the time.
> 
> Here, starting kmail manualy:
> 18:37:31.245 kmail2(2400) KMKernel::KMKernel: Starting up...
> 18:37:31.459 kmail2(2400)/libakonadi Akonadi::SessionPrivate::init: "KMail Kernel ETM"
> 18:37:31.491 kmail2(2400)/libakonadi Akonadi::ServerManager::start: executing akonadi_control
> 18:37:31.586 kmail2(2400)/libakonadi Akonadi::AgentManagerPrivate::createDBusInterface: waiting of akonadiserver ... 0
> 18:37:32.588 kmail2(2400)/libakonadi Akonadi::AgentManagerPrivate::createDBusInterface: waiting of akonadiserver ... 1
> 18:37:33.588 kmail2(2400)/libakonadi Akonadi::AgentManagerPrivate::createDBusInterface: waiting of akonadiserver ... 2
> 18:37:34.590 kmail2(2400)/libakonadi Akonadi::AgentManagerPrivate::createDBusInterface: waiting of akonadiserver ... 3
> 18:37:35.590 kmail2(2400)/libakonadi Akonadi::AgentManagerPrivate::createDBusInterface: waiting of akonadiserver ... 4
> 18:37:36.591 kmail2(2400)/libakonadi Akonadi::AgentManagerPrivate::createDBusInterface: waiting of akonadiserver ... 5
> 18:37:37.592 kmail2(2400)/libakonadi Akonadi::AgentManagerPrivate::createDBusInterface: waiting of akonadiserver ... 6
> 18:37:38.593 kmail2(2400)/libakonadi Akonadi::AgentManagerPrivate::createDBusInterface: waiting of akonadiserver ... 7
> 18:37:39.593 kmail2(2400)/libakonadi Akonadi::AgentManagerPrivate::createDBusInterface: waiting of akonadiserver ... 8
> 18:37:40.594 kmail2(2400)/libakonadi Akonadi::AgentManagerPrivate::createDBusInterface: waiting of akonadiserver ... 9
> 18:37:41.595 kmail2(2400)/libakonadi Akonadi::AgentManagerPrivate::createDBusInterface: waiting of akonadiserver ... 10
> 18:37:42.596 kmail2(2400)/libakonadi Akonadi::AgentManagerPrivate::createDBusInterface: mManager is valid
> 
> 
> This addresses bug 321186.
>     http://bugs.kde.org/show_bug.cgi?id=321186
> 
> 
> Diffs
> -----
> 
>   akonadi/agentmanager.cpp 457a87d 
> 
> Diff: http://git.reviewboard.kde.org/r/112062/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Guy Maurel
> 
>

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list