summaryrefslogtreecommitdiffstats
path: root/input/device.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2009-02-19 15:58:15 -0300
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2009-02-19 16:23:10 -0300
commit10d6858927cb3db0a06c42f41cdb5f3175082df3 (patch)
tree84b4164449b747d56c0d4b86b205f80744162fc5 /input/device.c
parente777c55aa7cd84fe63bcdee16acde8d1a293b928 (diff)
Make use of g_io_channel_shutdown instead of deprecated g_io_channel_close.
Diffstat (limited to 'input/device.c')
-rw-r--r--input/device.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/input/device.c b/input/device.c
index 4ab7aabc..3c050187 100644
--- a/input/device.c
+++ b/input/device.c
@@ -354,7 +354,7 @@ static void rfcomm_connect_cb(GIOChannel *chan, GError *err, gpointer user_data)
*/
fake->uinput = uinput_create(idev->name);
if (fake->uinput < 0) {
- g_io_channel_close(chan);
+ g_io_channel_shutdown(chan, TRUE, NULL);
reply = connection_attempt_failed(iconn->pending_connect,
strerror(errno));
goto failed;
@@ -405,7 +405,7 @@ static gboolean intr_watch_cb(GIOChannel *chan, GIOCondition cond, gpointer data
gboolean connected = FALSE;
if (cond & (G_IO_HUP | G_IO_ERR))
- g_io_channel_close(chan);
+ g_io_channel_shutdown(chan, TRUE, NULL);
emit_property_changed(idev->conn, idev->path, INPUT_DEVICE_INTERFACE,
"Connected", DBUS_TYPE_BOOLEAN, &connected);
@@ -429,7 +429,7 @@ static gboolean ctrl_watch_cb(GIOChannel *chan, GIOCondition cond, gpointer data
struct input_conn *iconn = data;
if (cond & (G_IO_HUP | G_IO_ERR))
- g_io_channel_close(chan);
+ g_io_channel_shutdown(chan, TRUE, NULL);
g_source_remove(iconn->intr_watch);
iconn->intr_watch = 0;
@@ -687,7 +687,7 @@ static void interrupt_connect_cb(GIOChannel *chan, GError *conn_err,
err = hidp_add_connection(idev, iconn);
if (err < 0) {
err_msg = strerror(-err);
- g_io_channel_close(chan);
+ g_io_channel_shutdown(chan, TRUE, NULL);
goto failed;
}
@@ -742,7 +742,7 @@ static void control_connect_cb(GIOChannel *chan, GError *conn_err,
reply = connection_attempt_failed(iconn->pending_connect,
err->message);
g_error_free(err);
- g_io_channel_close(chan);
+ g_io_channel_shutdown(chan, TRUE, NULL);
goto failed;
}
@@ -766,7 +766,7 @@ static int fake_disconnect(struct input_conn *iconn)
if (!fake->io)
return -ENOTCONN;
- g_io_channel_close(fake->io);
+ g_io_channel_shutdown(fake->io, TRUE, NULL);
g_io_channel_unref(fake->io);
fake->io = NULL;