diff options
author | Zhenhua Zhang <zhenhua.zhang@intel.com> | 2010-06-12 13:50:41 +0800 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-06-17 14:38:53 -0500 |
commit | 1822deba4ad820faa6bbfeb7760383ccc0cf31d1 (patch) | |
tree | 776009922c533a8d86c9441cd74196ceda07edad /gatchat/gatserver.c | |
parent | 047ea0cebbf2196d64ba81ab90efe5f8aeaf87fa (diff) | |
download | ofono-1822deba4ad820faa6bbfeb7760383ccc0cf31d1.tar.bz2 |
gatserver: Check for disconnection when resuming
If the internal GAtIO is no longer valid, treat it as if our channel was
disconnected.
Diffstat (limited to 'gatchat/gatserver.c')
-rw-r--r-- | gatchat/gatserver.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c index 6bb92443..3fa26a0e 100644 --- a/gatchat/gatserver.c +++ b/gatchat/gatserver.c @@ -1164,6 +1164,11 @@ void g_at_server_resume(GAtServer *server) server->suspended = FALSE; + if (g_at_io_get_channel(server->io) == NULL) { + io_disconnect(server); + return; + } + g_at_io_set_debug(server->io, server->debugf, server->debug_data); g_at_io_set_read_handler(server->io, new_bytes, server); |