[SailfishDevel] SyncML Plugin Server question

Chris Adams chris.adams at jolla.com
Fri Jul 26 03:37:55 UTC 2019


Hi,

I cannot be much help here (I don't remember much about it, and didn't know much about the syncml server to begin with) but I will ask a few questions just in case they help:

1) is it possible that the SyncML plugin works over a variety of transports (e.g. not just bluetooth but also TCP/IP or other transports)?  If so, then it might not necessarily be the case that stopping BT will stop the syncml server plugin process.

2) is it possible that there is a timer which will stop the syncml server plugin process after some period of inactivity (i.e. to prevent "churn" of starting the process, stopping the process, restarting the process, if there is some possibility that more syncs will occur in the near future)?  Check to see if the syncml server process is still running after 10 minutes, say.

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"?

I hope these questions help you resolve any issues!

Best regards,
Chris.

p.s. oopp means "out-of-process-plugin" (i.e. a separate process, using p2p dbus for comms, as opposed to a .so library plugin loaded in-process).

________________________________________
From: Devel [devel-bounces at lists.sailfishos.org] on behalf of deloptes [deloptes at gmail.com]
Sent: Thursday, July 25, 2019 11:06 PM
To: devel at lists.sailfishos.org
Subject: Re: [SailfishDevel] SyncML Plugin Server question

deloptes wrote:

> Hi,
>
> I wanted to know if following scenario is normal from msyncd point of view
> to stop the server when no sync was done and to leave the server running
> after one sync was done.
>
> E.0. restart msynd to make sure all is clean
> A.1. enable BT - msyncd spawns the syncml-server process
> A.2. disable BT - msyncd terminates the syncml-server process.
>
>
> E.0. restart msynd to make sure all is clean
> B.1. enable BT - msyncd spawns the syncml-server process
> B.2. perform sync from PC - sync session (agent) exits
> B.3. disable BT - msyncd does not terminate the syncml-server process.
>
>
> In A.2 it says
> [W] unknown:0 - Invalid reply for stopListen from plugin and process is
> killed-> exit 15
> [W] unknown:0 - The server thread for profile:  "syncml" is still running.
> Server will be deleted later
> Server stopped: "syncml"
> Process  "/usr/lib/buteo-plugins-qt5//oopp/syncml-server"  finished with
> exit code 15
>
> In B.3 it is not asking OOP profile or whatever to stop the server.
>
> Which behavior is the correct one? Or where I can read? From the code
> perspective in the plugin nothing was changed. When BT is disabled it
> updates the state and emits the signal. Why is the buteo-syncfw behaving
> differently?
>
> Thank you in advance
>
> regards
>

I just found this one - so it is intentional? But we are adding reference to
the server onNewSession. I am not sure if this is correct. Let me know more
about it.

Thank you

void ServerPluginRunner::onSessionDone()
{
    FUNCTION_CALL_TRACE;

    // Remove reference to the server plug-in. This may result in stopping
    // the server plug-in, if it doesn't need to be active any more.

#if 0
    // SyncML Server plugin should not die after one single session
    // Don't think removing the server reference is useful
    if (iServerActivator != 0)
    {
        iServerActivator->removeRef(plugin()->getProfileName());
    }
#endif
}


_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org


More information about the Devel mailing list