Commit 26ec55b6 authored by Lefebvre, Jordan's avatar Lefebvre, Jordan
Browse files

Fixing session_disconnect and SSH_AGAIN seen as error in ssh_channel_read.

parent 08200926
This diff is collapsed.
......@@ -141,6 +141,11 @@ void SessionWorker::disconnect()
{
radix_tagged_line("Disconnecting session.");
ssh_disconnect(p->session);
// copy options in preparation for deletion
ssh_session new_session = ssh_new();
ssh_options_copy(p->session, &new_session);
ssh_free(p->session);
p->session = new_session;
emit disconnectSuccessful();
}
}
......@@ -395,7 +400,7 @@ void SessionWorker::requestExec(QString command)
{
ssh_channel_send_eof(channel);
}
if (nbytes < 0)
if (nbytes < SSH_ERROR)
{
emit execFailed("Failed to read response from remote command.");
}
......
......@@ -273,6 +273,7 @@ void ExamplePortalWidget::execOutputReady()
void ExamplePortalWidget::execFailed(QString message)
{
radix_tagged_line(message.toStdString());
mTextEdit->append(message);
mTextEdit->append("\n");
}
......
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