summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-adapter.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2006-09-25 15:19:58 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2006-09-25 15:19:58 +0000
commit15974e3190a05a68923bb40dfab457781b18e397 (patch)
tree50d432dfeab2b87c30485733a4af4138fed24157 /hcid/dbus-adapter.c
parent31cde096773710688456b6e02418d0c9ac2b4912 (diff)
Keep watching the bonding IO channel after the connection has been created
Diffstat (limited to 'hcid/dbus-adapter.c')
-rw-r--r--hcid/dbus-adapter.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/hcid/dbus-adapter.c b/hcid/dbus-adapter.c
index 7986b028..c7f11d5b 100644
--- a/hcid/dbus-adapter.c
+++ b/hcid/dbus-adapter.c
@@ -1808,6 +1808,12 @@ static gboolean create_bonding_conn_complete(GIOChannel *io, GIOCondition cond,
goto cleanup;
}
+ if (cond & G_IO_HUP & G_IO_ERR) {
+ debug("Hangup or error on bonding IO channel");
+ error_failed(pdata->bonding->conn, pdata->bonding->rq, EIO);
+ goto failed;
+ }
+
sk = g_io_channel_unix_get_fd(io);
len = sizeof(ret);
@@ -1867,7 +1873,9 @@ static gboolean create_bonding_conn_complete(GIOChannel *io, GIOCondition cond,
hci_close_dev(dd);
- pdata->bonding->io_id = 0;
+ pdata->bonding->io_id = g_io_add_watch(io, G_IO_NVAL | G_IO_HUP | G_IO_ERR,
+ (GIOFunc) create_bonding_conn_complete,
+ pdata);
return FALSE;