[hotssh] tab: Avoid queuing pty size request when disconnected
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hotssh] tab: Avoid queuing pty size request when disconnected
- Date: Thu, 27 Feb 2014 13:18:02 +0000 (UTC)
commit 5b9305ef45fb2b06113fb3c735ca18b0840af4cc
Author: Colin Walters <walters verbum org>
Date: Thu Feb 27 08:17:36 2014 -0500
tab: Avoid queuing pty size request when disconnected
This was a crasher.
src/hotssh-tab.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/hotssh-tab.c b/src/hotssh-tab.c
index 4fff82f..af4db51 100644
--- a/src/hotssh-tab.c
+++ b/src/hotssh-tab.c
@@ -859,10 +859,16 @@ idle_send_pty_size_request (gpointer user_data)
guint height = vte_terminal_get_row_count ((VteTerminal*)priv->terminal);
priv->queued_pty_size_id = 0;
- priv->need_pty_size_request = FALSE;
- priv->sent_pty_size_request = TRUE;
- gssh_channel_request_pty_size_async (priv->channel, width, height,
- priv->cancellable, on_pty_size_complete, self);
+
+ g_assert (priv->connection);
+
+ if (gssh_connection_get_state (priv->connection) == GSSH_CONNECTION_STATE_CONNECTED)
+ {
+ priv->need_pty_size_request = FALSE;
+ priv->sent_pty_size_request = TRUE;
+ gssh_channel_request_pty_size_async (priv->channel, width, height,
+ priv->cancellable, on_pty_size_complete, self);
+ }
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]