diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-04-27 16:26:54 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-04-28 17:27:33 -0500 |
commit | 43c30e22926f9f945b0ec2edc7ee3dbdf5e4370b (patch) | |
tree | d978408586bd673a1dfe981e08084009f8ab8d9a /gatchat/gatio.c | |
parent | 204814da058b7e6ee9ce00a26a03105853968e79 (diff) | |
download | ofono-43c30e22926f9f945b0ec2edc7ee3dbdf5e4370b.tar.bz2 |
gatio: Remove g_at_io_shutdown
Diffstat (limited to 'gatchat/gatio.c')
-rw-r--r-- | gatchat/gatio.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/gatchat/gatio.c b/gatchat/gatio.c index 63bfd827..05c2e753 100644 --- a/gatchat/gatio.c +++ b/gatchat/gatio.c @@ -208,6 +208,18 @@ GAtIO *g_at_io_ref(GAtIO *io) return io; } +static gboolean io_shutdown(GAtIO *io) +{ + /* Don't trigger user disconnect on shutdown */ + io->user_disconnect = NULL; + io->user_disconnect_data = NULL; + + if (io->read_watch > 0) + g_source_remove(io->read_watch); + + return TRUE; +} + void g_at_io_unref(GAtIO *io) { gboolean is_zero; @@ -220,7 +232,7 @@ void g_at_io_unref(GAtIO *io) if (is_zero == FALSE) return; - g_at_io_shutdown(io); + io_shutdown(io); /* glib delays the destruction of the watcher until it exits, this * means we can't free the data just yet, even though we've been @@ -233,21 +245,6 @@ void g_at_io_unref(GAtIO *io) g_free(io); } -gboolean g_at_io_shutdown(GAtIO *io) -{ - if (io->channel == NULL) - return FALSE; - - /* Don't trigger user disconnect on shutdown */ - io->user_disconnect = NULL; - io->user_disconnect_data = NULL; - - if (io->read_watch > 0) - g_source_remove(io->read_watch); - - return TRUE; -} - gboolean g_at_io_set_disconnect_function(GAtIO *io, GAtDisconnectFunc disconnect, gpointer user_data) { |