Skip to content
Snippets Groups Projects
Commit b7abc03e authored by ck's avatar ck
Browse files

Maemo: Fix race condition in SSH output reader.

parent e4024d22
No related branches found
No related tags found
No related merge requests found
...@@ -132,9 +132,11 @@ void MaemoInteractiveSshConnection::runCommand(const QString &command) ...@@ -132,9 +132,11 @@ void MaemoInteractiveSshConnection::runCommand(const QString &command)
const char * const error = lastError(); const char * const error = lastError();
if (error) if (error)
throw MaemoSshException(tr("SSH error: %1").arg(error)); throw MaemoSshException(tr("SSH error: %1").arg(error));
const char * output = ssh.readAndReset(channel(), alloc); const char * const output = ssh.readAndReset(channel(), alloc);
if (output) { if (output) {
emit remoteOutput(QString::fromUtf8(output)); emit remoteOutput(QString::fromUtf8(output));
if (!done)
done = strstr(output, m_prompt) != 0;
delete[] output; delete[] output;
} }
} while (!done && !stopRequested()); } while (!done && !stopRequested());
......
...@@ -6,7 +6,6 @@ SUPPORT_QT_MAEMO = $$(QTCREATOR_WITH_MAEMO) ...@@ -6,7 +6,6 @@ SUPPORT_QT_MAEMO = $$(QTCREATOR_WITH_MAEMO)
# INCLUDEPATH += $$PWD/../../../libs/3rdparty/net7ssh/src # INCLUDEPATH += $$PWD/../../../libs/3rdparty/net7ssh/src
# INCLUDEPATH += $$PWD/../../../libs/3rdparty/botan/build # INCLUDEPATH += $$PWD/../../../libs/3rdparty/botan/build
# LIBS += -l$$qtLibraryTarget(Net7ssh) -l$$qtLibraryTarget(Botan) # LIBS += -l$$qtLibraryTarget(Net7ssh) -l$$qtLibraryTarget(Botan)
HEADERS += $$PWD/maemorunconfiguration.h \ HEADERS += $$PWD/maemorunconfiguration.h \
$$PWD/maemomanager.h \ $$PWD/maemomanager.h \
$$PWD/maemotoolchain.h \ $$PWD/maemotoolchain.h \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment