Maemo: Check whether UTFS server could actually connect.

This commit is contained in:
qt-info@nokia.com
2010-08-12 11:24:43 +02:00
committed by ck
parent 724ecfcafb
commit 76561b928c

View File

@@ -301,7 +301,8 @@ void MaemoRemoteMounter::startUtfsServers()
<< (m_connection->connectionParameters().host + QLatin1Char(':') + port)
<< mountSpec.localDir;
utfsServerProc->start(utfsServer(), utfsServerArgs);
if (!utfsServerProc->waitForStarted()) {
if (!utfsServerProc->waitForStarted()
|| !utfsServerProc->waitForFinished(5000)) {
const QByteArray &errorOutput
= utfsServerProc->readAllStandardError();
QString errorMsg = tr("Could not start UTFS server: %1")
@@ -313,7 +314,6 @@ void MaemoRemoteMounter::startUtfsServers()
emit error(errorMsg);
return;
}
utfsServerProc->waitForFinished();
m_utfsServers << utfsServerProc;
}