SSH: Handle exit-status and exit-signal in SFTP channels as well.

This commit is contained in:
Christian Kandeler
2010-08-19 15:30:54 +02:00
parent 0a7e4c430a
commit 15ab69497f
6 changed files with 46 additions and 21 deletions

View File

@@ -31,6 +31,7 @@
#include "sftpchannel_p.h"
#include "sshexception_p.h"
#include "sshincomingpacket_p.h"
#include "sshsendfacility_p.h"
#include <QtCore/QDir>
@@ -248,6 +249,22 @@ void SftpChannelPrivate::handleChannelExtendedDataInternal(quint32 type,
data.data(), type);
}
void SftpChannelPrivate::handleExitStatus(const SshChannelExitStatus &exitStatus)
{
const char * const message = "Remote SFTP service exited with exit code %d";
#ifdef CREATOR_SSH_DEBUG
qDebug(message, exitStatus.exitStatus);
#else
if (exitStatus.exitStatus != 0)
qWarning(message, exitStatus.exitStatus);
#endif
}
void SftpChannelPrivate::handleExitSignal(const SshChannelExitSignal &signal)
{
qWarning("Remote SFTP service killed; signal was %s", signal.signal.data());
}
void SftpChannelPrivate::handleCurrentPacket()
{
#ifdef CREATOR_SSH_DEBUG