diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp index 092f478a2c3..3aca439313d 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp @@ -308,7 +308,6 @@ void MaemoRemoteMounter::handleUtfsClientsFinished(int exitStatus) setState(Inactive); if (exitStatus == SshRemoteProcess::ExitedNormally && m_mountProcess->exitCode() == 0) { - m_utfsServerTimer->stop(); emit reportProgress(tr("Mount operation succeeded.")); emit mounted(); } else { @@ -377,6 +376,7 @@ void MaemoRemoteMounter::handleUtfsServerError(QProcess::ProcessError) .arg(QString::fromLocal8Bit(errorOutput)); } killAllUtfsServers(); + killUtfsClients(); emit error(tr("Error running UTFS server: %1").arg(errorString)); setState(Inactive); @@ -434,8 +434,8 @@ void MaemoRemoteMounter::handleUtfsServerTimeout() return; killAllUtfsServers(); + killUtfsClients(); emit error(tr("Timeout waiting for UTFS servers to connect.")); - // TODO: utfs clients are still waiting; kill them here setState(Inactive); } @@ -459,5 +459,13 @@ void MaemoRemoteMounter::setState(State newState) m_state = newState; } +void MaemoRemoteMounter::killUtfsClients() +{ + const SshRemoteProcess::Ptr utfsClientKiller + = m_connection->createRemoteProcess("pkill utfs-client; sleep 1; " + "pkill -9 utfs-client"); + utfsClientKiller->start(); +} + } // namespace Internal } // namespace Qt4ProjectManager diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.h b/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.h index 4533e130686..9445d3d050d 100644 --- a/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.h +++ b/src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.h @@ -108,6 +108,7 @@ private: void startUtfsClients(); void killUtfsServer(QProcess *proc); void killAllUtfsServers(); + void killUtfsClients(); QString utfsClientOnDevice() const; QString utfsServer() const;