commit bluez for openSUSE:Factory
Hello community, here is the log from the commit of package bluez for openSUSE:Factory checked in at Mon Feb 16 01:13:49 CET 2009. -------- --- bluez/bluez.changes 2009-02-08 16:09:03.000000000 +0100 +++ /mounts/work_src_done/STABLE/bluez/bluez.changes 2009-02-13 09:33:57.000000000 +0100 @@ -1,0 +2,12 @@ +Fri Feb 13 09:30:36 CET 2009 - seife@suse.de + +- update to bluez-4.30: + - Add CID field to L2CAP socket address structure. + - Fix reset of authentication requirements after bonding. + - Fix storing of link keys when using dedicated bonding. + - Fix storing of pre-Bluetooth 2.1 link keys. + - Fix resetting trust settings on every reboot. + - Fix handling of local name changes. + - Fix memory leaks in hciconfig and hcitool + +------------------------------------------------------------------- bluez-gstreamer.changes: same change calling whatdependson for head-i586 Old: ---- bluez-4.29.tar.bz2 New: ---- bluez-4.30.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ bluez-gstreamer.spec ++++++ --- /var/tmp/diff_new_pack.i25852/_old 2009-02-16 01:13:25.000000000 +0100 +++ /var/tmp/diff_new_pack.i25852/_new 2009-02-16 01:13:25.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package bluez-gstreamer (Version 4.29) +# spec file for package bluez-gstreamer (Version 4.30) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -24,7 +24,7 @@ BuildRequires: alsa-devel libsndfile-devel BuildRequires: gstreamer-0_10-devel gstreamer-0_10-plugins-base-devel Url: http://www.bluez.org -Version: 4.29 +Version: 4.30 Release: 1 Summary: Bluetooth Sound Support Group: Productivity/Multimedia/Sound/Utilities @@ -109,6 +109,15 @@ %{_libdir}/gstreamer-*/*.so %changelog +* Fri Feb 13 2009 seife@suse.de +- update to bluez-4.30: + - Add CID field to L2CAP socket address structure. + - Fix reset of authentication requirements after bonding. + - Fix storing of link keys when using dedicated bonding. + - Fix storing of pre-Bluetooth 2.1 link keys. + - Fix resetting trust settings on every reboot. + - Fix handling of local name changes. + - Fix memory leaks in hciconfig and hcitool * Sun Feb 08 2009 seife@suse.de - update to bluez-4.29: - Use AVRCP version 1.0 for now. ++++++ bluez.spec ++++++ --- /var/tmp/diff_new_pack.i25852/_old 2009-02-16 01:13:25.000000000 +0100 +++ /var/tmp/diff_new_pack.i25852/_new 2009-02-16 01:13:25.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package bluez (Version 4.29) +# spec file for package bluez (Version 4.30) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -23,7 +23,7 @@ BuildRequires: glib2-devel libnl-devel libusb-devel BuildRequires: alsa-devel libsndfile-devel Url: http://www.bluez.org -Version: 4.29 +Version: 4.30 Release: 1 Summary: Bluetooth Stack for Linux Group: Hardware/Mobile @@ -353,6 +353,15 @@ %doc %{_mandir}/man1/dund.1.gz %changelog +* Fri Feb 13 2009 seife@suse.de +- update to bluez-4.30: + - Add CID field to L2CAP socket address structure. + - Fix reset of authentication requirements after bonding. + - Fix storing of link keys when using dedicated bonding. + - Fix storing of pre-Bluetooth 2.1 link keys. + - Fix resetting trust settings on every reboot. + - Fix handling of local name changes. + - Fix memory leaks in hciconfig and hcitool * Sun Feb 08 2009 seife@suse.de - update to bluez-4.29: - Use AVRCP version 1.0 for now. ++++++ bluez-4.29.tar.bz2 -> bluez-4.30.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-4.29/audio/unix.c new/bluez-4.30/audio/unix.c --- old/bluez-4.29/audio/unix.c 2009-02-02 02:30:43.000000000 +0100 +++ new/bluez-4.30/audio/unix.c 2009-02-12 20:35:38.000000000 +0100 @@ -317,7 +317,7 @@ client->data_fd = headset_get_sco_fd(dev); if (client->data_fd < 0) { error("Unable to get a SCO fd"); - headset_unlock(client->dev, hs->lock); + headset_unlock(dev, hs->lock); goto failed; } @@ -648,8 +648,6 @@ struct a2dp_data *a2dp; int err = 0; - client->type = select_service(dev, client->interface); - switch (client->type) { case TYPE_SINK: a2dp = &client->d.a2dp; @@ -691,8 +689,6 @@ struct headset_data *hs; unsigned int id; - client->type = select_service(dev, client->interface); - switch (client->type) { case TYPE_SINK: a2dp = &client->d.a2dp; @@ -758,8 +754,6 @@ struct headset_data *hs; unsigned int id; - client->type = select_service(dev, client->interface); - switch (client->type) { case TYPE_SINK: a2dp = &client->d.a2dp; @@ -813,8 +807,6 @@ struct headset_data *hs; unsigned int id; - client->type = select_service(dev, client->interface); - switch (client->type) { case TYPE_SINK: a2dp = &client->d.a2dp; @@ -870,8 +862,8 @@ str2ba(req->device, &bdaddr); if (client->interface) { - g_free(client->interface); - client->interface = NULL; + error("Got GET_CAPABILITIES for an initialized client"); + goto failed; } if (req->transport == BT_CAPABILITIES_TRANSPORT_SCO) @@ -883,15 +875,19 @@ goto failed; dev = manager_find_device(&bdaddr, client->interface, TRUE); + if (!dev && (req->flags & BT_FLAG_AUTOCONNECT)) + dev = manager_find_device(&bdaddr, client->interface, FALSE); + if (!dev) { - if (req->flags & BT_FLAG_AUTOCONNECT) - dev = manager_find_device(&bdaddr, client->interface, FALSE); - else - goto failed; + error("Unable to find a matching device"); + goto failed; } - if (!dev) + client->type = select_service(dev, client->interface); + if (client->type == TYPE_NONE) { + error("No matching service found"); goto failed; + } start_discovery(dev, client); @@ -904,7 +900,10 @@ static int handle_sco_transport(struct unix_client *client, struct bt_set_configuration_req *req) { - client->interface = g_strdup(AUDIO_HEADSET_INTERFACE); + if (!client->interface) + client->interface = g_strdup(AUDIO_HEADSET_INTERFACE); + else if (!g_str_equal(client->interface, AUDIO_HEADSET_INTERFACE)) + return -EIO; debug("config sco - device = %s access_mode = %u", req->device, req->access_mode); @@ -919,7 +918,10 @@ struct sbc_codec_cap sbc_cap; struct mpeg_codec_cap mpeg_cap; - client->interface = g_strdup(AUDIO_SINK_INTERFACE); + if (!client->interface) + client->interface = g_strdup(AUDIO_SINK_INTERFACE); + else if (!g_str_equal(client->interface, AUDIO_SINK_INTERFACE)) + return -EIO; if (client->caps) { g_slist_foreach(client->caps, (GFunc) g_free, NULL); @@ -1003,11 +1005,6 @@ str2ba(req->device, &bdaddr); - if (client->interface) { - g_free(client->interface); - client->interface = NULL; - } - if (req->codec.transport == BT_CAPABILITIES_TRANSPORT_SCO) { err = handle_sco_transport(client, req); if (err < 0) { diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-4.29/ChangeLog new/bluez-4.30/ChangeLog --- old/bluez-4.29/ChangeLog 2009-02-07 15:05:26.000000000 +0100 +++ new/bluez-4.30/ChangeLog 2009-02-12 20:35:38.000000000 +0100 @@ -1,3 +1,12 @@ +ver 4.30: + Add CID field to L2CAP socket address structure. + Fix reset of authentication requirements after bonding. + Fix storing of link keys when using dedicated bonding. + Fix storing of pre-Bluetooth 2.1 link keys. + Fix resetting trust settings on every reboot. + Fix handling of local name changes. + Fix memory leaks in hciconfig and hcitool + ver 4.29: Use AVRCP version 1.0 for now. Decrease AVDTP idle timeout to one second. diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-4.29/configure new/bluez-4.30/configure --- old/bluez-4.29/configure 2009-02-07 15:06:09.000000000 +0100 +++ new/bluez-4.30/configure 2009-02-12 20:36:13.000000000 +0100 @@ -2530,7 +2530,7 @@ # Define the identity of the package. PACKAGE=bluez - VERSION=4.29 + VERSION=4.30 cat >>confdefs.h <<_ACEOF diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-4.29/configure.ac new/bluez-4.30/configure.ac --- old/bluez-4.29/configure.ac 2009-02-07 15:05:26.000000000 +0100 +++ new/bluez-4.30/configure.ac 2009-02-12 20:35:38.000000000 +0100 @@ -1,7 +1,7 @@ AC_PREREQ(2.60) AC_INIT() -AM_INIT_AUTOMAKE(bluez, 4.29) +AM_INIT_AUTOMAKE(bluez, 4.30) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-4.29/include/l2cap.h new/bluez-4.30/include/l2cap.h --- old/bluez-4.29/include/l2cap.h 2009-01-08 17:00:12.000000000 +0100 +++ new/bluez-4.30/include/l2cap.h 2009-02-12 20:35:38.000000000 +0100 @@ -41,6 +41,7 @@ sa_family_t l2_family; unsigned short l2_psm; bdaddr_t l2_bdaddr; + unsigned short l2_cid; }; /* L2CAP socket options */ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-4.29/lib/Makefile.am new/bluez-4.30/lib/Makefile.am --- old/bluez-4.29/lib/Makefile.am 2009-02-07 15:05:26.000000000 +0100 +++ new/bluez-4.30/lib/Makefile.am 2009-02-12 20:35:38.000000000 +0100 @@ -2,7 +2,7 @@ lib_LTLIBRARIES = libbluetooth.la libbluetooth_la_SOURCES = bluetooth.c hci.c sdp.c -libbluetooth_la_LDFLAGS = -version-info 4:2:1 +libbluetooth_la_LDFLAGS = -version-info 5:0:2 INCLUDES = -I$(top_builddir)/include diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-4.29/lib/Makefile.in new/bluez-4.30/lib/Makefile.in --- old/bluez-4.29/lib/Makefile.in 2009-02-07 15:06:04.000000000 +0100 +++ new/bluez-4.30/lib/Makefile.in 2009-02-12 20:36:09.000000000 +0100 @@ -208,7 +208,7 @@ top_srcdir = @top_srcdir@ lib_LTLIBRARIES = libbluetooth.la libbluetooth_la_SOURCES = bluetooth.c hci.c sdp.c -libbluetooth_la_LDFLAGS = -version-info 4:2:1 +libbluetooth_la_LDFLAGS = -version-info 5:0:2 INCLUDES = -I$(top_builddir)/include MAINTAINERCLEANFILES = Makefile.in all: all-am diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-4.29/src/adapter.c new/bluez-4.30/src/adapter.c --- old/bluez-4.29/src/adapter.c 2009-02-07 15:05:26.000000000 +0100 +++ new/bluez-4.30/src/adapter.c 2009-02-12 20:35:38.000000000 +0100 @@ -814,6 +814,28 @@ strerror(errno), errno); } +void adapter_name_changed(struct btd_adapter *adapter, const char *name) +{ + struct hci_dev *dev = &adapter->dev; + int dd; + + if (strncmp(name, (char *) dev->name, 248) == 0) + return; + + write_local_name(&adapter->bdaddr, (char *) name); + + strncpy((char *) dev->name, name, 248); + + dd = hci_open_dev(adapter->dev_id); + if (dd >= 0) { + update_ext_inquiry_response(dd, dev); + hci_close_dev(dd); + } + + emit_property_changed(connection, adapter->path, ADAPTER_INTERFACE, + "Name", DBUS_TYPE_STRING, &name); +} + static int adapter_set_name(struct btd_adapter *adapter, const char *name) { struct hci_dev *dev = &adapter->dev; @@ -854,7 +876,6 @@ { struct btd_adapter *adapter = data; int ecode; - const char *path; if (!g_utf8_validate(name, -1, NULL)) { error("Name change failed: supplied name isn't valid UTF-8"); @@ -865,10 +886,8 @@ if (ecode < 0) return failed_strerror(msg, -ecode); - path = dbus_message_get_path(msg); - - emit_property_changed(conn, path, ADAPTER_INTERFACE, "Name", - DBUS_TYPE_STRING, &name); + emit_property_changed(conn, adapter->path, ADAPTER_INTERFACE, + "Name", DBUS_TYPE_STRING, &name); return dbus_message_new_method_return(msg); } @@ -957,15 +976,9 @@ void adapter_remove_device(DBusConnection *conn, struct btd_adapter *adapter, struct btd_device *device) { - bdaddr_t dst; const gchar *dev_path = device_get_path(device); struct agent *agent; - char dstaddr[18]; - - device_get_address(device, &dst); - ba2str(&dst, dstaddr); - delete_entry(&adapter->bdaddr, "profiles", dstaddr); adapter->devices = g_slist_remove(adapter->devices, device); adapter->connections = g_slist_remove(adapter->connections, device); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-4.29/src/adapter.h new/bluez-4.30/src/adapter.h --- old/bluez-4.29/src/adapter.h 2009-01-16 18:20:09.000000000 +0100 +++ new/bluez-4.30/src/adapter.h 2009-02-12 20:35:38.000000000 +0100 @@ -112,6 +112,7 @@ void adapter_update_oor_devices(struct btd_adapter *adapter); void adapter_remove_oor_device(struct btd_adapter *adapter, char *peer_addr); void adapter_mode_changed(struct btd_adapter *adapter, uint8_t scan_mode); +void adapter_name_changed(struct btd_adapter *adapter, const char *name); struct agent *adapter_get_agent(struct btd_adapter *adapter); void adapter_add_connection(struct btd_adapter *adapter, struct btd_device *device, uint16_t handle); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-4.29/src/dbus-hci.c new/bluez-4.30/src/dbus-hci.c --- old/bluez-4.29/src/dbus-hci.c 2009-02-07 15:05:26.000000000 +0100 +++ new/bluez-4.30/src/dbus-hci.c 2009-02-12 20:35:38.000000000 +0100 @@ -917,12 +917,26 @@ get_auth_requirements(local, peer, &local_auth); remote_auth = device_get_auth(device); - /* Only store the link key if neither side had "no bonding" as a - * requirement */ - if ((key_type == 0x06 && old_key_type != 0xff) || - (local_auth > 0x01 && remote_auth > 0x01)) { + debug("local auth 0x%02x and remote auth 0x%02x", + local_auth, remote_auth); + + /* Only store the link key if one of the following is true: + * 1. this is a legacy link key + * 2. this is a changed combination key and there was a previously + * stored one + * 3. neither local nor remote side had no-bonding as a requirement + * 4. the local side had dedicated bonding as a requirement + * 5. the remote side is using dedicated bonding since in that case + * also the local requirements are set to dedicated bonding + */ + if (key_type < 0x03 || (key_type == 0x06 && old_key_type != 0xff) || + (local_auth > 0x01 && remote_auth > 0x01) || + (local_auth == 0x02 || local_auth == 0x03) || + (remote_auth == 0x02 || remote_auth == 0x03)) { int err; + debug("storing link key of type 0x%02x", key_type); + err = write_link_key(local, peer, key, new_key_type, pin_length); if (err < 0) { @@ -1035,20 +1049,20 @@ void hcid_dbus_setname_complete(bdaddr_t *local) { + struct btd_adapter *adapter; int id, dd = -1; read_local_name_rp rp; struct hci_request rq; const char *pname = (char *) rp.name; - char local_addr[18], name[249]; - - ba2str(local, local_addr); + char name[249]; - id = hci_devid(local_addr); - if (id < 0) { - error("No matching device id for %s", local_addr); + adapter = manager_find_adapter(local); + if (!adapter) { + error("No matching adapter found"); return; } + id = adapter_get_dev_id(adapter); dd = hci_open_dev(id); if (dd < 0) { error("HCI device open failed: hci%d", id); @@ -1076,6 +1090,8 @@ strncpy(name, pname, sizeof(name) - 1); name[248] = '\0'; pname = name; + + adapter_name_changed(adapter, pname); } void hcid_dbus_setscan_enable_complete(bdaddr_t *local) @@ -1185,7 +1201,7 @@ if (hci_read_simple_pairing_mode(dd, &mode, HCI_REQ_TIMEOUT) < 0) { - error("Can't read class of adapter on %s: %s(%d)", + error("Can't read simple pairing mode for %s: %s(%d)", path, strerror(errno), errno); hci_close_dev(dd); return; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-4.29/src/device.c new/bluez-4.30/src/device.c --- old/bluez-4.29/src/device.c 2009-02-07 15:05:26.000000000 +0100 +++ new/bluez-4.30/src/device.c 2009-02-12 20:35:38.000000000 +0100 @@ -700,13 +700,24 @@ "Paired", DBUS_TYPE_BOOLEAN, &paired); } +static void device_remove_stored(struct btd_device *device, + DBusConnection *conn) +{ + bdaddr_t src; + char addr[18]; + + adapter_get_address(device->adapter, &src); + ba2str(&device->bdaddr, addr); + device_remove_bonding(device, conn); + delete_entry(&src, "profiles", addr); + delete_entry(&src, "trusts", addr); +} + void device_remove(struct btd_device *device, DBusConnection *conn, - gboolean remove_bonding) + gboolean remove_stored) { GSList *list; struct btd_device_driver *driver; - bdaddr_t src; - char addr[18]; gchar *path = g_strdup(device->path); debug("Removing device %s", path); @@ -714,8 +725,8 @@ if (device->bonding) device_cancel_bonding(device, HCI_OE_USER_ENDED_CONNECTION); - if (!device->temporary && remove_bonding) - device_remove_bonding(device, conn); + if (!device->temporary && remove_stored) + device_remove_stored(device, conn); for (list = device->drivers; list; list = list->next) { struct btd_driver_data *driver_data = list->data; @@ -725,9 +736,6 @@ g_free(driver_data); } - adapter_get_address(device->adapter, &src); - ba2str(&device->bdaddr, addr); - delete_entry(&src, "trusts", addr); g_dbus_unregister_interface(conn, path, DEVICE_INTERFACE); @@ -1854,6 +1862,7 @@ if (status) goto failed; + device->auth = 0xff; device->temporary = FALSE; g_free(device->authr); @@ -1893,7 +1902,6 @@ return; failed: - device_cancel_bonding(device, status); } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-4.29/src/device.h new/bluez-4.30/src/device.h --- old/bluez-4.29/src/device.h 2009-02-07 15:05:26.000000000 +0100 +++ new/bluez-4.30/src/device.h 2009-02-12 20:35:38.000000000 +0100 @@ -37,7 +37,7 @@ struct btd_device *device_create(DBusConnection *conn, struct btd_adapter *adapter, const gchar *address); void device_remove(struct btd_device *device, DBusConnection *conn, - gboolean remove_bonding); + gboolean remove_stored); gint device_address_cmp(struct btd_device *device, const gchar *address); int device_browse(struct btd_device *device, DBusConnection *conn, DBusMessage *msg, uuid_t *search, gboolean reverse); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-4.29/tools/hciconfig.c new/bluez-4.30/tools/hciconfig.c --- old/bluez-4.29/tools/hciconfig.c 2009-02-02 02:30:43.000000000 +0100 +++ new/bluez-4.30/tools/hciconfig.c 2009-02-12 20:35:38.000000000 +0100 @@ -85,7 +85,10 @@ static void print_pkt_type(struct hci_dev_info *di) { - printf("\tPacket type: %s\n", hci_ptypetostr(di->pkt_type)); + char *str; + str = hci_ptypetostr(di->pkt_type); + printf("\tPacket type: %s\n", str); + bt_free(str); } static void print_link_policy(struct hci_dev_info *di) @@ -95,7 +98,10 @@ static void print_link_mode(struct hci_dev_info *di) { - printf("\tLink mode: %s\n", hci_lmtostr(di->link_mode)); + char *str; + str = hci_lmtostr(di->link_mode); + printf("\tLink mode: %s\n", str); + bt_free(str); } static void print_dev_features(struct hci_dev_info *di, int format) @@ -1586,10 +1592,13 @@ static void print_dev_info(int ctl, struct hci_dev_info *di) { struct hci_dev_stats *st = &di->stat; + char *str; print_dev_hdr(di); - printf("\t%s\n", hci_dflagstostr(di->flags) ); + str = hci_dflagstostr(di->flags); + printf("\t%s\n", str); + bt_free(str); printf("\tRX bytes:%d acl:%d sco:%d events:%d errors:%d\n", st->byte_rx, st->acl_rx, st->sco_rx, st->evt_rx, st->err_rx); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/bluez-4.29/tools/hcitool.c new/bluez-4.30/tools/hcitool.c --- old/bluez-4.29/tools/hcitool.c 2009-02-07 15:05:26.000000000 +0100 +++ new/bluez-4.30/tools/hcitool.c 2009-02-12 20:35:38.000000000 +0100 @@ -102,11 +102,13 @@ for (i = 0; i < cl->conn_num; i++, ci++) { char addr[18]; + char *str; ba2str(&ci->bdaddr, addr); + str = hci_lmtostr(ci->link_mode); printf("\t%s %s %s handle %d state %d lm %s\n", ci->out ? "<" : ">", type2str(ci->type), - addr, ci->handle, ci->state, - hci_lmtostr(ci->link_mode)); + addr, ci->handle, ci->state, str); + bt_free(str); } return 0; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de