commit bluez for openSUSE:Factory

Hello community, here is the log from the commit of package bluez for openSUSE:Factory checked in at Wed Dec 29 23:33:29 CET 2010. -------- --- bluez/bluez-gstreamer.changes 2010-12-27 01:15:41.000000000 +0100 +++ /mounts/work_src_done/STABLE/bluez/bluez-gstreamer.changes 2010-12-28 23:15:56.000000000 +0100 @@ -1,0 +2,9 @@ +Tue Dec 28 22:11:32 UTC 2010 - seife@opensuse.org + +- update to bluez-4.84: + - Fix issue with wrong parameters and device found signals. + - Fix issue with leaking EIR data if RSSI does not change. + - Fix issue with adapter initialization state. + - Fix issue with closing of SDP server sockets. + +------------------------------------------------------------------- bluez.changes: same change calling whatdependson for head-i586 Old: ---- bluez-4.83.tar.bz2 New: ---- bluez-4.84.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ bluez-gstreamer.spec ++++++ --- /var/tmp/diff_new_pack.W6svYu/_old 2010-12-29 23:31:53.000000000 +0100 +++ /var/tmp/diff_new_pack.W6svYu/_new 2010-12-29 23:31:53.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package bluez-gstreamer (Version 4.83) +# spec file for package bluez-gstreamer (Version 4.84) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -28,7 +28,7 @@ BuildRequires: alsa-devel libsndfile-devel pkg-config udev BuildRequires: gstreamer-0_10-devel gstreamer-0_10-plugins-base-devel Url: http://www.bluez.org -Version: 4.83 +Version: 4.84 Release: 1 Summary: Bluetooth Sound Support Group: Productivity/Multimedia/Sound/Utilities ++++++ bluez.spec ++++++ --- /var/tmp/diff_new_pack.W6svYu/_old 2010-12-29 23:31:53.000000000 +0100 +++ /var/tmp/diff_new_pack.W6svYu/_new 2010-12-29 23:31:53.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package bluez (Version 4.83) +# spec file for package bluez (Version 4.84) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -27,7 +27,7 @@ BuildRequires: glib2-devel libnl-devel libusb-devel BuildRequires: alsa-devel libsndfile-devel pkg-config udev Url: http://www.bluez.org -Version: 4.83 +Version: 4.84 Release: 1 Summary: Bluetooth Stack for Linux Group: Hardware/Mobile ++++++ bluez-4.83.tar.bz2 -> bluez-4.84.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.83/ChangeLog new/bluez-4.84/ChangeLog --- old/bluez-4.83/ChangeLog 2010-12-26 18:20:48.000000000 +0100 +++ new/bluez-4.84/ChangeLog 2010-12-28 17:47:33.000000000 +0100 @@ -1,3 +1,9 @@ +ver 4.84: + Fix issue with wrong parameters and device found signals. + Fix issue with leaking EIR data if RSSI does not change. + Fix issue with adapter initialization state. + Fix issue with closing of SDP server sockets. + ver 4.83: Fix issue with already connected HFP/HSP endpoints. Fix missing reply when create device is canceled. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.83/audio/headset.c new/bluez-4.84/audio/headset.c --- old/bluez-4.83/audio/headset.c 2010-12-18 20:12:17.000000000 +0100 +++ new/bluez-4.84/audio/headset.c 2010-12-28 17:47:33.000000000 +0100 @@ -1445,7 +1445,8 @@ error("Unable to get service record: %s (%d)", strerror(-err), -err); p->err = -err; - error_connect_failed(dev->conn, p->msg, p->err); + if (p->msg) + error_connect_failed(dev->conn, p->msg, p->err); goto failed; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.83/configure new/bluez-4.84/configure --- old/bluez-4.83/configure 2010-12-26 18:21:25.000000000 +0100 +++ new/bluez-4.84/configure 2010-12-28 17:48:08.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for bluez 4.83. +# Generated by GNU Autoconf 2.63 for bluez 4.84. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. @@ -743,8 +743,8 @@ # Identity of this package. PACKAGE_NAME='bluez' PACKAGE_TARNAME='bluez' -PACKAGE_VERSION='4.83' -PACKAGE_STRING='bluez 4.83' +PACKAGE_VERSION='4.84' +PACKAGE_STRING='bluez 4.84' PACKAGE_BUGREPORT='' ac_default_prefix=/usr/local @@ -1606,7 +1606,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures bluez 4.83 to adapt to many kinds of systems. +\`configure' configures bluez 4.84 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1676,7 +1676,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of bluez 4.83:";; + short | recursive ) echo "Configuration of bluez 4.84:";; esac cat <<\_ACEOF @@ -1836,7 +1836,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -bluez configure 4.83 +bluez configure 4.84 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1850,7 +1850,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by bluez $as_me 4.83, which was +It was created by bluez $as_me 4.84, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -2700,7 +2700,7 @@ # Define the identity of the package. PACKAGE='bluez' - VERSION='4.83' + VERSION='4.84' cat >>confdefs.h <<_ACEOF @@ -14313,7 +14313,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by bluez $as_me 4.83, which was +This file was extended by bluez $as_me 4.84, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14376,7 +14376,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -bluez config.status 4.83 +bluez config.status 4.84 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.83/configure.ac new/bluez-4.84/configure.ac --- old/bluez-4.83/configure.ac 2010-12-26 18:20:48.000000000 +0100 +++ new/bluez-4.84/configure.ac 2010-12-28 17:47:33.000000000 +0100 @@ -1,5 +1,5 @@ AC_PREREQ(2.60) -AC_INIT(bluez, 4.83) +AC_INIT(bluez, 4.84) AM_INIT_AUTOMAKE([foreign subdir-objects]) AM_CONFIG_HEADER(config.h) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.83/plugins/hciops.c new/bluez-4.84/plugins/hciops.c --- old/bluez-4.83/plugins/hciops.c 2010-12-26 18:20:48.000000000 +0100 +++ new/bluez-4.84/plugins/hciops.c 2010-12-28 17:47:33.000000000 +0100 @@ -422,7 +422,7 @@ if (adapter == NULL) return FALSE; - btd_adapter_get_state(adapter, &mode, &on_mode, &pairable); + btd_adapter_get_mode(adapter, &mode, &on_mode, &pairable); if (existing_adapter) mode = on_mode; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.83/plugins/mgmtops.c new/bluez-4.84/plugins/mgmtops.c --- old/bluez-4.83/plugins/mgmtops.c 2010-12-26 18:20:48.000000000 +0100 +++ new/bluez-4.84/plugins/mgmtops.c 2010-12-28 17:47:33.000000000 +0100 @@ -316,7 +316,7 @@ return; } - btd_adapter_get_state(adapter, &mode, NULL, &pairable); + btd_adapter_get_mode(adapter, &mode, NULL, &pairable); if (mode == MODE_OFF) { mgmt_set_powered(index, FALSE); return; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.83/src/adapter.c new/bluez-4.84/src/adapter.c --- old/bluez-4.83/src/adapter.c 2010-12-26 18:20:48.000000000 +0100 +++ new/bluez-4.84/src/adapter.c 2010-12-28 17:47:33.000000000 +0100 @@ -134,6 +134,7 @@ struct hci_dev dev; /* hci info */ gboolean pairable; /* pairable state */ + gboolean initialized; gboolean off_requested; /* DEVDOWN ioctl was called */ @@ -2246,7 +2247,7 @@ return type; } -void btd_adapter_get_state(struct btd_adapter *adapter, uint8_t *mode, +void btd_adapter_get_mode(struct btd_adapter *adapter, uint8_t *mode, uint8_t *on_mode, gboolean *pairable) { char str[14], address[18]; @@ -2263,9 +2264,14 @@ } if (on_mode) { - if (main_opts.remember_powered == FALSE) - *on_mode = main_opts.mode; - else if (read_on_mode(address, str, sizeof(str)) < 0) + if (main_opts.remember_powered == FALSE) { + if (adapter->initialized) + *on_mode = get_mode(&adapter->bdaddr, "on"); + else { + *on_mode = main_opts.mode; + adapter->initialized = TRUE; + } + } else if (read_on_mode(address, str, sizeof(str)) < 0) *on_mode = main_opts.mode; else *on_mode = get_mode(&adapter->bdaddr, str); @@ -2841,9 +2847,9 @@ "RSSI", DBUS_TYPE_INT16, &rssi, "Name", DBUS_TYPE_STRING, &dev->name, "Paired", DBUS_TYPE_BOOLEAN, &paired, - "UUIDs", DBUS_TYPE_ARRAY, &dev->uuids, "Broadcaster", DBUS_TYPE_BOOLEAN, &broadcaster, - dev->uuid_count, NULL); + "UUIDs", DBUS_TYPE_ARRAY, &dev->uuids, uuid_count, + NULL); return; } @@ -2867,7 +2873,7 @@ "Alias", DBUS_TYPE_STRING, &alias, "LegacyPairing", DBUS_TYPE_BOOLEAN, &dev->legacy, "Paired", DBUS_TYPE_BOOLEAN, &paired, - "UUIDs", DBUS_TYPE_ARRAY, &dev->uuids, dev->uuid_count, + "UUIDs", DBUS_TYPE_ARRAY, &dev->uuids, uuid_count, NULL); g_free(alias); @@ -2917,10 +2923,18 @@ } } +static void dev_prepend_uuid(gpointer data, gpointer user_data) +{ + struct remote_dev_info *dev = user_data; + char *new_uuid = data; + + dev->services = g_slist_prepend(dev->services, g_strdup(new_uuid)); +} + void adapter_update_device_from_info(struct btd_adapter *adapter, - bdaddr_t bdaddr, int8_t rssi, - uint8_t evt_type, char *name, - GSList *services, uint8_t flags) + bdaddr_t bdaddr, int8_t rssi, + uint8_t evt_type, const char *name, + GSList *services, uint8_t flags) { struct remote_dev_info *dev; gboolean new_dev; @@ -2939,13 +2953,13 @@ (GCompareFunc) dev_rssi_cmp); g_slist_foreach(services, remove_same_uuid, dev); - dev->services = g_slist_concat(dev->services, services); + g_slist_foreach(services, dev_prepend_uuid, dev); dev->flags = flags; if (name) { g_free(dev->name); - dev->name = name; + dev->name = g_strdup(name); } /* FIXME: check if other information was changed before emitting the @@ -2983,7 +2997,7 @@ (GCompareFunc) dev_rssi_cmp); g_slist_foreach(services, remove_same_uuid, dev); - dev->services = g_slist_concat(dev->services, services); + g_slist_foreach(services, dev_prepend_uuid, dev); adapter_emit_device_found(adapter, dev); } @@ -3009,6 +3023,8 @@ const gchar *path = adapter_get_path(adapter); gboolean discoverable, pairable; + DBG("old 0x%02x new 0x%02x", adapter->scan_mode, scan_mode); + if (adapter->scan_mode == scan_mode) return; @@ -3372,16 +3388,12 @@ int btd_adapter_switch_online(struct btd_adapter *adapter) { - gboolean discoverable; - if (!adapter_ops) return -EINVAL; if (adapter->up) return 0; - discoverable = get_mode(&adapter->bdaddr, "on") == MODE_DISCOVERABLE; - return adapter_ops->set_powered(adapter->dev_id, TRUE); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.83/src/adapter.h new/bluez-4.84/src/adapter.h --- old/bluez-4.83/src/adapter.h 2010-12-26 18:20:48.000000000 +0100 +++ new/bluez-4.84/src/adapter.h 2010-12-28 17:47:33.000000000 +0100 @@ -61,7 +61,6 @@ NAME_NOT_REQUIRED, /* used by get remote name without name resolving */ NAME_REQUIRED, /* remote name needs be resolved */ NAME_REQUESTED, /* HCI remote name request was sent */ - NAME_SENT /* D-Bus signal RemoteNameUpdated sent */ } name_status_t; struct btd_adapter; @@ -106,7 +105,7 @@ int btd_adapter_stop(struct btd_adapter *adapter); -void btd_adapter_get_state(struct btd_adapter *adapter, uint8_t *mode, +void btd_adapter_get_mode(struct btd_adapter *adapter, uint8_t *mode, uint8_t *on_mode, gboolean *pairable); int adapter_update_ssp_mode(struct btd_adapter *adapter, uint8_t mode); @@ -136,9 +135,9 @@ struct remote_dev_info *adapter_search_found_devices(struct btd_adapter *adapter, struct remote_dev_info *match); void adapter_update_device_from_info(struct btd_adapter *adapter, - bdaddr_t bdaddr, int8_t rssi, - uint8_t evt_type, char *name, - GSList *services, uint8_t flags); + bdaddr_t bdaddr, int8_t rssi, + uint8_t evt_type, const char *name, + GSList *services, uint8_t flags); void adapter_update_found_devices(struct btd_adapter *adapter, bdaddr_t *bdaddr, int8_t rssi, uint32_t class, const char *name, const char *alias, gboolean legacy, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.83/src/event.c new/bluez-4.84/src/event.c --- old/bluez-4.83/src/event.c 2010-12-26 18:20:48.000000000 +0100 +++ new/bluez-4.84/src/event.c 2010-12-28 17:47:33.000000000 +0100 @@ -431,6 +431,13 @@ return 0; } +static void free_eir_data(struct eir_data *eir) +{ + g_slist_foreach(eir->services, (GFunc) g_free, NULL); + g_slist_free(eir->services); + g_free(eir->name); +} + void btd_event_advertising_report(bdaddr_t *local, le_advertising_info *info) { struct btd_adapter *adapter; @@ -444,7 +451,6 @@ return; } - /* Extract UUIDs from advertising data if any */ memset(&eir_data, 0, sizeof(eir_data)); err = parse_eir_data(&eir_data, info->data, info->length); if (err < 0) @@ -456,6 +462,8 @@ adapter_update_device_from_info(adapter, info->bdaddr, rssi, info->evt_type, eir_data.name, eir_data.services, eir_data.flags); + + free_eir_data(&eir_data); } static void update_lastseen(bdaddr_t *sba, bdaddr_t *dba) @@ -487,12 +495,12 @@ struct btd_adapter *adapter; struct btd_device *device; char local_addr[18], peer_addr[18], *alias, *name; - struct remote_dev_info *dev, match; name_status_t name_status; struct eir_data eir_data; int state, err; dbus_bool_t legacy; unsigned char features[8]; + const char *dev_name; ba2str(local, local_addr); ba2str(peer, peer_addr); @@ -519,26 +527,6 @@ adapter_set_state(adapter, state); } - /* Extract UUIDs from extended inquiry response if any */ - memset(&eir_data, 0, sizeof(eir_data)); - err = parse_eir_data(&eir_data, data, EIR_DATA_LENGTH); - if (err < 0) - error("Error parsing EIR data: %s (%d)", strerror(-err), -err); - - memset(&match, 0, sizeof(struct remote_dev_info)); - bacpy(&match.bdaddr, peer); - match.name_status = NAME_SENT; - /* if found: don't send the name again */ - dev = adapter_search_found_devices(adapter, &match); - if (dev) { - g_free(eir_data.name); - adapter_update_found_devices(adapter, peer, rssi, class, - NULL, NULL, dev->legacy, - eir_data.services, - NAME_NOT_REQUIRED); - return; - } - /* the inquiry result can be triggered by NON D-Bus client */ if (adapter_get_discover_type(adapter) & DISC_RESOLVNAME && adapter_has_discov_sessions(adapter)) @@ -564,32 +552,30 @@ } else legacy = TRUE; - if (eir_data.name) { + memset(&eir_data, 0, sizeof(eir_data)); + err = parse_eir_data(&eir_data, data, EIR_DATA_LENGTH); + if (err < 0) + error("Error parsing EIR data: %s (%d)", strerror(-err), -err); + + /* Complete EIR names are always used. Shortened EIR names are only + * used if there is no name already in storage. */ + dev_name = name; + if (eir_data.name != NULL) { if (eir_data.name_complete) { write_device_name(local, peer, eir_data.name); name_status = NAME_NOT_REQUIRED; - - if (name) - g_free(name); - - name = eir_data.name; - } else { - if (name) - free(eir_data.name); - else - name = eir_data.name; - } + dev_name = eir_data.name; + } else if (name == NULL) + dev_name = eir_data.name; } - if (name && eir_data.name_complete) - name_status = NAME_SENT; - - /* add in the list to track name sent/pending */ - adapter_update_found_devices(adapter, peer, rssi, class, name, alias, - legacy, eir_data.services, name_status); - - g_free(name); - g_free(alias); + adapter_update_found_devices(adapter, peer, rssi, class, dev_name, + alias, legacy, eir_data.services, + name_status); + + free_eir_data(&eir_data); + free(name); + free(alias); } void btd_event_set_legacy_pairing(bdaddr_t *local, bdaddr_t *peer, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.83/src/sdpd-server.c new/bluez-4.84/src/sdpd-server.c --- old/bluez-4.83/src/sdpd-server.c 2010-05-23 14:47:19.000000000 +0200 +++ new/bluez-4.84/src/sdpd-server.c 2010-12-28 17:47:33.000000000 +0100 @@ -48,7 +48,7 @@ #include "log.h" #include "sdpd.h" -static GIOChannel *l2cap_io = NULL, *unix_io = NULL; +static guint l2cap_id = 0, unix_id = 0; static int l2cap_sock, unix_sock; @@ -195,10 +195,8 @@ GIOChannel *io; int nsk; - if (cond & (G_IO_HUP | G_IO_ERR | G_IO_NVAL)) { - g_io_channel_unref(chan); + if (cond & (G_IO_HUP | G_IO_ERR | G_IO_NVAL)) return FALSE; - } if (data == &l2cap_sock) { struct sockaddr_l2 addr; @@ -233,6 +231,7 @@ { int compat = flags & SDP_SERVER_COMPAT; int master = flags & SDP_SERVER_MASTER; + GIOChannel *io; info("Starting SDP server"); @@ -256,18 +255,21 @@ } } - l2cap_io = g_io_channel_unix_new(l2cap_sock); - g_io_channel_set_close_on_unref(l2cap_io, TRUE); + io = g_io_channel_unix_new(l2cap_sock); + g_io_channel_set_close_on_unref(io, TRUE); - g_io_add_watch(l2cap_io, G_IO_IN | G_IO_ERR | G_IO_HUP | G_IO_NVAL, + l2cap_id = g_io_add_watch(io, G_IO_IN | G_IO_ERR | G_IO_HUP | G_IO_NVAL, io_accept_event, &l2cap_sock); + g_io_channel_unref(io); if (compat && unix_sock > fileno(stderr)) { - unix_io = g_io_channel_unix_new(unix_sock); - g_io_channel_set_close_on_unref(unix_io, TRUE); + io = g_io_channel_unix_new(unix_sock); + g_io_channel_set_close_on_unref(io, TRUE); - g_io_add_watch(unix_io, G_IO_IN | G_IO_ERR | G_IO_HUP | G_IO_NVAL, + unix_id = g_io_add_watch(io, + G_IO_IN | G_IO_ERR | G_IO_HUP | G_IO_NVAL, io_accept_event, &unix_sock); + g_io_channel_unref(io); } return 0; @@ -279,9 +281,12 @@ sdp_svcdb_reset(); - if (unix_io) - g_io_channel_unref(unix_io); + if (unix_id > 0) + g_source_remove(unix_id); + + if (l2cap_id > 0) + g_source_remove(l2cap_id); - if (l2cap_io) - g_io_channel_unref(l2cap_io); + l2cap_id = unix_id = 0; + l2cap_sock = unix_sock = -1; } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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