diff options
author | Jose Antonio Santos Cadenas <santoscadenas@gmail.com> | 2010-10-14 16:19:26 +0200 |
---|---|---|
committer | Jose Antonio Santos Cadenas <santoscadenas@gmail.com> | 2010-10-21 09:44:12 +0200 |
commit | 549bc07502d5aa82da73cf4d5caf5bc02aee5c4f (patch) | |
tree | 1ab21ee6f13fca57a52e55cae8968a33dc412e30 /health | |
parent | a0da5dee55a67b75c4825e027bf004f9ad223469 (diff) | |
download | bluez-549bc07502d5aa82da73cf4d5caf5bc02aee5c4f.tar.gz |
Notify main channel when it is locally opened
Diffstat (limited to 'health')
-rw-r--r-- | health/hdp.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/health/hdp.c b/health/hdp.c index 7ffb9f05..a10d3032 100644 --- a/health/hdp.c +++ b/health/hdp.c @@ -1474,6 +1474,7 @@ static void hdp_mdl_conn_cb(struct mcap_mdl *mdl, GError *err, gpointer data) { struct hdp_tmp_dc_data *hdp_conn = data; struct hdp_channel *hdp_chann = hdp_conn->hdp_chann; + struct hdp_device *dev = hdp_chann->dev; DBusMessage *reply; GError *gerr = NULL; @@ -1498,6 +1499,15 @@ static void hdp_mdl_conn_cb(struct mcap_mdl *mdl, GError *err, gpointer data) DBUS_TYPE_OBJECT_PATH, &hdp_chann->path, DBUS_TYPE_INVALID); g_dbus_send_message(hdp_conn->conn, reply); + + if (dev->fr) + return; + + dev->fr = hdp_chann; + + emit_property_changed(dev->conn, device_get_path(dev->dev), + HEALTH_DEVICE, "MainChannel", + DBUS_TYPE_OBJECT_PATH, &dev->fr->path); } static void device_create_mdl_cb(struct mcap_mdl *mdl, uint8_t conf, |