Commit 64e47901 authored by Christian Kandeler's avatar Christian Kandeler
Browse files

Maemo: Fix SFTP channel leak.

Reviewed-by: dt
parent 90c4e237
......@@ -169,18 +169,6 @@ void MaemoRemoteMounter::handleUnmountProcessFinished(int exitStatus)
void MaemoRemoteMounter::stop()
{
setState(Inactive);
if (m_utfsClientUploader) {
disconnect(m_utfsClientUploader.data(), 0, this, 0);
m_utfsClientUploader->closeChannel();
}
if (m_mountProcess) {
disconnect(m_mountProcess.data(), 0, this, 0);
m_mountProcess->closeChannel();
}
if (m_unmountProcess) {
disconnect(m_unmountProcess.data(), 0, this, 0);
m_unmountProcess->closeChannel();
}
}
void MaemoRemoteMounter::deployUtfsClient()
......@@ -456,8 +444,21 @@ void MaemoRemoteMounter::assertState(const QList<State> &expectedStates,
void MaemoRemoteMounter::setState(State newState)
{
if (newState == Inactive)
if (newState == Inactive) {
m_utfsServerTimer->stop();
if (m_utfsClientUploader) {
disconnect(m_utfsClientUploader.data(), 0, this, 0);
m_utfsClientUploader->closeChannel();
}
if (m_mountProcess) {
disconnect(m_mountProcess.data(), 0, this, 0);
m_mountProcess->closeChannel();
}
if (m_unmountProcess) {
disconnect(m_unmountProcess.data(), 0, this, 0);
m_unmountProcess->closeChannel();
}
}
m_state = newState;
}
......
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