Chris Adams wrote: > 3) it's worth checking `git blame <filename>` to see which commit added > that #ifdef to try to see why it was done that way. It may be incorrect. > If you trace the code, can you see any other such cases where the > reference count to a plugin process was not updated "appropriately"? >
To dig into it is out of scope for this project, but I wanted to have honest opinion. I agree with Sateesh, but then not sure why ref is added only on sync session, which makes server die each time you disable bluetooth. There is not much one could do from the plugin to prevent this. The logic is in buteo-syncfw. It should be applying to all plugins. Thanks for the git blame hint git blame msyncd/ServerPluginRunner.cpp 5346dacf (Sateesh Kavuri 2013-08-02 15:07:56 +0000 281) #if 0 5346dacf (Sateesh Kavuri 2013-08-02 15:07:56 +0000 282) // SyncML Server plugin should not die after one single session 5346dacf (Sateesh Kavuri 2013-08-02 15:07:56 +0000 283) // Don't think removing the server reference is useful ^cd8dab0 (Sergey Gerasimenko 2010-06-29 15:51:21 +0300 284) if (iServerActivator != 0) ^cd8dab0 (Sergey Gerasimenko 2010-06-29 15:51:21 +0300 285) { ^cd8dab0 (Sergey Gerasimenko 2010-06-29 15:51:21 +0300 286) iServerActivator->removeRef(plugin()->getProfileName()); ^cd8dab0 (Sergey Gerasimenko 2010-06-29 15:51:21 +0300 287) } 5346dacf (Sateesh Kavuri 2013-08-02 15:07:56 +0000 288) #endif commit 5346dacffa7f760f4485f4dc1f7a22ad4fa84fc0 Author: Sateesh Kavuri <sateesh.kav...@gmail.com> Date: Fri Aug 2 15:07:56 2013 +0000 After every sync session, the framework removes the references of the sever because of which the server plugin is killed. Servers are expected to outlive sync sessions and so #ifdef'd the reference removal part. This change enables multiple sync sessions to happen Signed-off-by: Sateesh Kavuri <sateesh.kav...@gmail.com> _______________________________________________ SailfishOS.org Devel mailing list To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org