Commit 33f69816 authored by Christian Kandeler's avatar Christian Kandeler
Browse files

Maemo: Delay UTFS server start a bit.

We have no way to know when the client is actually opening its ports,
so we wait until we are reasonably sure it's done.
This is not 100% safe, but should generally suffice.
(The UTFS server seems to have this logic already built in, but it does
not seem to work on Mac.)
parent a437f824
......@@ -258,7 +258,7 @@ void MaemoRemoteMounter::startUtfsClients()
void MaemoRemoteMounter::handleUtfsClientsStarted()
{
if (!m_stop)
startUtfsServers();
QTimer::singleShot(250, this, SLOT(startUtfsServers()));
}
void MaemoRemoteMounter::handleUtfsClientsFinished(int exitStatus)
......@@ -282,6 +282,9 @@ void MaemoRemoteMounter::handleUtfsClientsFinished(int exitStatus)
void MaemoRemoteMounter::startUtfsServers()
{
if (m_stop)
return;
emit reportProgress(tr("Starting UTFS servers..."));
m_utfsServerTimer->start(30000);
for (int i = 0; i < m_mountSpecs.count(); ++i) {
......
......@@ -92,11 +92,11 @@ private slots:
QProcess::ExitStatus exitStatus);
void handleUtfsServerTimeout();
void handleUtfsServerStderr();
void startUtfsServers();
private:
void deployUtfsClient();
void startUtfsClients();
void startUtfsServers();
void killUtfsServer(QProcess *proc);
void killAllUtfsServers();
QString utfsClientOnDevice() const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment