summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-06-07 19:32:26 -0500
committerDenis Kenzior <denkenz@gmail.com>2010-06-07 19:32:26 -0500
commit719842ea39145409e20295d4817203a613cd4bdb (patch)
treeaecee3cc5e71058a90882e9fe944284f7a4b08df
parentcc6a43c477c1310643279139ba6808799a8c637e (diff)
gatchat: Check for disconnection when resuming
If the internal GAtIO is no longer valid, treat it as if our channel was disconnected.
-rw-r--r--gatchat/gatchat.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gatchat/gatchat.c b/gatchat/gatchat.c
index 9456f00a..f192a907 100644
--- a/gatchat/gatchat.c
+++ b/gatchat/gatchat.c
@@ -913,6 +913,11 @@ void g_at_chat_resume(GAtChat *chat)
chat->suspended = FALSE;
+ if (g_at_io_get_channel(chat->io) == NULL) {
+ io_disconnect(chat);
+ return;
+ }
+
g_at_io_set_disconnect_function(chat->io, io_disconnect, chat);
g_at_io_set_debug(chat->io, chat->debugf, chat->debug_data);