From 39e3294a8c54b3c73d3b8fb5bef67431e97d727d Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 18 Jun 2019 13:52:39 +0200 Subject: [PATCH] SSH: Log some more information for sftp sessions Change-Id: I9065866920b964a32e9b5b6204a6e42bc15acdfe Reviewed-by: hjk --- src/libs/ssh/sftpsession.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libs/ssh/sftpsession.cpp b/src/libs/ssh/sftpsession.cpp index efced580c99..528475ed2b9 100644 --- a/src/libs/ssh/sftpsession.cpp +++ b/src/libs/ssh/sftpsession.cpp @@ -83,6 +83,8 @@ struct SftpSession::SftpSessionPrivate SftpJobId queueCommand(CommandType command, const QStringList &paths) { + qCDebug(sshLog) << "queueing command" << int(command) << paths; + const SftpJobId jobId = nextJobId++; pendingCommands.enqueue(Command(command, paths, jobId)); runNextCommand(); @@ -111,6 +113,7 @@ SftpSession::SftpSession(const QStringList &connectionArgs) : d(new SftpSessionP { d->connectionArgs = connectionArgs; connect(&d->sftpProc, &QProcess::started, [this] { + qCDebug(sshLog) << "sftp process started"; d->sftpProc.write("\n"); // Force initial prompt. }); connect(&d->sftpProc, &QProcess::errorOccurred, [this](QProcess::ProcessError error) { @@ -120,6 +123,8 @@ SftpSession::SftpSession(const QStringList &connectionArgs) : d(new SftpSessionP } }); connect(&d->sftpProc, QOverload::of(&QProcess::finished), [this] { + qCDebug(sshLog) << "sftp process finished"; + d->state = State::Inactive; if (d->sftpProc.exitStatus() != QProcess::NormalExit) { emit done(tr("sftp crashed.")); @@ -269,6 +274,8 @@ void SftpSession::start() void SftpSession::quit() { + qCDebug(sshLog) << "quitting sftp session, current state is" << int(state()); + switch (state()) { case State::Starting: case State::Closing: