Hello community,
here is the log from the commit of package bluez for openSUSE:Factory
checked in at Tue Nov 2 16:08:05 CET 2010.
--------
--- bluez/bluez-gstreamer.changes 2010-10-15 20:59:53.000000000 +0200
+++ /mounts/work_src_done/STABLE/bluez/bluez-gstreamer.changes 2010-10-27 10:07:41.000000000 +0200
@@ -1,0 +2,11 @@
+Wed Oct 27 07:31:04 UTC 2010 - seife@opensuse.org
+
+- update to bluez-4.77:
+ - Fix issue with device name and accessing already freed memory.
+ - Fix issue with handling CHLD=0 command for handsfree.
+ - Fix issue with manager properties and no adapters.
+ - Fix issue with properties and broken service records.
+ - Fix issue with A2DP playback and sample rate changes.
+ - Update MCAP and HDP support.
+
+-------------------------------------------------------------------
bluez.changes: same change
calling whatdependson for head-i586
Old:
----
bluez-4.76.tar.bz2
New:
----
bluez-4.77.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ bluez-gstreamer.spec ++++++
--- /var/tmp/diff_new_pack.vzrHlt/_old 2010-11-02 16:07:30.000000000 +0100
+++ /var/tmp/diff_new_pack.vzrHlt/_new 2010-11-02 16:07:30.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package bluez-gstreamer (Version 4.76)
+# spec file for package bluez-gstreamer (Version 4.77)
#
# 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.76
+Version: 4.77
Release: 1
Summary: Bluetooth Sound Support
Group: Productivity/Multimedia/Sound/Utilities
++++++ bluez.spec ++++++
--- /var/tmp/diff_new_pack.vzrHlt/_old 2010-11-02 16:07:30.000000000 +0100
+++ /var/tmp/diff_new_pack.vzrHlt/_new 2010-11-02 16:07:30.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package bluez (Version 4.76)
+# spec file for package bluez (Version 4.77)
#
# 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.76
+Version: 4.77
Release: 1
Summary: Bluetooth Stack for Linux
Group: Hardware/Mobile
@@ -289,11 +289,8 @@
%config %{_sysconfdir}/udev/rules.d/*
%endif
%{_sysconfdir}/init.d/bluez-coldplug
-#%dir %{_libdir}/bluetooth
-#%dir %{_libdir}/bluetooth/plugins
%doc %{_mandir}/man8/hciattach.8.gz
%doc %{_mandir}/man8/hciconfig.8.gz
-#%doc %{_mandir}/man5/hcid.conf.5.gz
%doc %{_mandir}/man8/bluetoothd.8.gz
%doc %{_mandir}/man8/hid2hci.8.gz
%doc %{_mandir}/man8/bccmd.8.gz
@@ -310,7 +307,6 @@
%config(noreplace) %{_sysconfdir}/bluetooth/rfcomm.conf
/var/adm/fillup-templates/sysconfig.bluetooth
%config %{_sysconfdir}/dbus-1/system.d/bluetooth.conf
-#%doc %{_defaultdocdir}/bluez-utils/
%dir /var/lib/bluetooth
%dir %{_sysconfdir}/modprobe.d
%config(noreplace) %{_sysconfdir}/modprobe.d/50-bluetooth.conf
@@ -320,7 +316,6 @@
/usr/include/bluetooth
%{_libdir}/libbluetooth.so
%{_libdir}/pkgconfig/bluez.pc
-#%{_datadir}/aclocal/bluez.m4
%files -n libbluetooth3
%defattr(-, root, root)
@@ -332,7 +327,6 @@
%dir %{cups_lib_dir}
%dir %{cups_lib_dir}/backend
%{cups_lib_dir}/backend/bluetooth
-#%doc %{_defaultdocdir}/bluez-cups
%files test
%defattr(-,root,root)
@@ -353,13 +347,6 @@
%{_bindir}/test-serial
%{_bindir}/test-service
%{_bindir}/test-telephony
-#%{_bindir}/hsmicro
-#%{_bindir}/hsplay
-#%{_bindir}/hstest
-#%{_bindir}/attest
-#%{_bindir}/passkey-agent
-#%{_bindir}/auth-agent
-#%doc %{_defaultdocdir}/bluez-test
%files alsa
%defattr(-,root,root)
++++++ bluez-4.76.tar.bz2 -> bluez-4.77.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.76/AUTHORS new/bluez-4.77/AUTHORS
--- old/bluez-4.76/AUTHORS 2010-10-14 17:18:02.000000000 +0200
+++ new/bluez-4.77/AUTHORS 2010-10-25 21:00:00.000000000 +0200
@@ -50,3 +50,6 @@
José Antonio Santos Cadenas
Francisco Alecrim
Daniel Orstadius
+Anderson Briglia
+Anderson Lizardo
+Bruna Moreira
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.76/ChangeLog new/bluez-4.77/ChangeLog
--- old/bluez-4.76/ChangeLog 2010-10-14 17:18:02.000000000 +0200
+++ new/bluez-4.77/ChangeLog 2010-10-25 21:00:00.000000000 +0200
@@ -1,3 +1,11 @@
+ver 4.77:
+ Fix issue with device name and accessing already freed memory.
+ Fix issue with handling CHLD=0 command for handsfree.
+ Fix issue with manager properties and no adapters.
+ Fix issue with properties and broken service records.
+ Fix issue with A2DP playback and sample rate changes.
+ Update MCAP and HDP support.
+
ver 4.76:
Fix issue in telephony driver with hanging up held call.
Fix issue in telephony driver with notifications when on hold.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.76/Makefile.am new/bluez-4.77/Makefile.am
--- old/bluez-4.76/Makefile.am 2010-10-14 17:18:02.000000000 +0200
+++ new/bluez-4.77/Makefile.am 2010-10-25 21:00:00.000000000 +0200
@@ -240,7 +240,7 @@
src/dbus-common.c src/dbus-common.h \
src/dbus-hci.h src/dbus-hci.c
src_bluetoothd_LDADD = lib/libbluetooth.la @GLIB_LIBS@ @DBUS_LIBS@ \
- @CAPNG_LIBS@ -ldl
+ @CAPNG_LIBS@ -ldl -lrt
src_bluetoothd_LDFLAGS = -Wl,--export-dynamic \
-Wl,--version-script=$(srcdir)/src/bluetooth.ver
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.76/Makefile.in new/bluez-4.77/Makefile.in
--- old/bluez-4.76/Makefile.in 2010-10-14 17:18:41.000000000 +0200
+++ new/bluez-4.77/Makefile.in 2010-10-25 21:00:32.000000000 +0200
@@ -1038,7 +1038,7 @@
src/dbus-hci.h src/dbus-hci.c
src_bluetoothd_LDADD = lib/libbluetooth.la @GLIB_LIBS@ @DBUS_LIBS@ \
- @CAPNG_LIBS@ -ldl
+ @CAPNG_LIBS@ -ldl -lrt
src_bluetoothd_LDFLAGS = -Wl,--export-dynamic \
-Wl,--version-script=$(srcdir)/src/bluetooth.ver
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.76/TODO new/bluez-4.77/TODO
--- old/bluez-4.76/TODO 2010-10-14 17:18:02.000000000 +0200
+++ new/bluez-4.77/TODO 2010-10-25 21:00:00.000000000 +0200
@@ -14,8 +14,45 @@
Higher complexity tasks should be refined into several lower complexity tasks
once the task is better understood.
-LE Generic Access Profile
-=========================
+Low Energy
+==========
+
+- Avoid Characteristic discovery for non connectable devices. Proper parsing
+ of LE Advertising Report Event is missing. Event_Type field needs to be
+ extracted and its value shall be considered before to start the LE
+ connection on the channel 4. Characteristic discovery should not be
+ started for non connectable devices.
+
+ Priority: Medium
+ Complexity: C2
+
+- Advertising management. Adapter interface needs to be changed to manage
+ connection modes, adapter type and advertising policy. See Volume 3,
+ Part C, section 9.3. If Attribute Server is enabled the LE capable
+ adapter shall to start advertising. Further investigation is necessary
+ to define which connectable mode needs to be supported: Non-connectable,
+ directed connectable and undirected connectable. Basically, two connectable
+ scenarios shall be addressed:
+ 1. GATT client is disconnected, but intends to become a Peripheral to
+ receive indications/notifications.
+ 2. GATT server intends to accept connections.
+
+ Priority: Medium
+ Complexity: C2
+
+- Define Auto Connection Establishment Procedure. Some profiles such as
+ Proximity requires an active link to identify path lost situation. It is
+ necessary to define how to manage connections, it seems that White List
+ is appropriated to address auto connections, however is not clear if the
+ this procedure shall be a profile specific detail or if the remote device
+ object can expose a property "WhiteList", maybe "Trusted" property can be
+ also used for this purpose. Another alternative is to define a method to
+ allow application to request/register the wanted scanning/connection
+ parameters. Before start this task, a RFC/PATCH shall be sent to the ML.
+ See Volume 3, Part C, section 9.3.5 for more information.
+
+ Priority: Medium
+ Complexity: C2
- Device Name Characteristic is a GAP characteristic for Low Energy. This
characteristic shall be integrated/used in the discovery procedure. The
@@ -120,3 +157,18 @@
Priority: Low
Complexity: C2
+
+- Define attribute server API. External applications needs to register,
+ change attributes and to be notified about changes. Example: Proximity,
+ Time and Alert Profiles. "Local Service hierarchy" in the attribute-api
+ needs to be proposed and a RFC shall be sent to the ML.
+
+ Priority: Low
+ Complexity: C2
+
+- gattrib needs to be extended to handle Attribute Protocol Transactions
+ timeout. See Volume 3, Part F, section 3.3.3 and Part G, section 4.14
+ for more information.
+
+ Priority: Low
+ Complexity: C2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.76/audio/a2dp.c new/bluez-4.77/audio/a2dp.c
--- old/bluez-4.76/audio/a2dp.c 2010-10-14 17:18:02.000000000 +0200
+++ new/bluez-4.77/audio/a2dp.c 2010-10-25 21:00:00.000000000 +0200
@@ -1028,6 +1028,9 @@
struct a2dp_sep *sep = setup->sep;
int posix_err;
+ if (!setup->rsep)
+ setup->rsep = avdtp_find_remote_sep(setup->session, sep->lsep);
+
posix_err = avdtp_set_configuration(setup->session, setup->rsep,
sep->lsep,
setup->client_caps,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.76/audio/device.h new/bluez-4.77/audio/device.h
--- old/bluez-4.76/audio/device.h 2010-01-09 21:52:17.000000000 +0100
+++ new/bluez-4.77/audio/device.h 2010-10-25 21:00:00.000000000 +0200
@@ -22,21 +22,21 @@
*
*/
-#define GENERIC_AUDIO_UUID "00001203-0000-1000-8000-00805F9B34FB"
+#define GENERIC_AUDIO_UUID "00001203-0000-1000-8000-00805f9b34fb"
-#define HSP_HS_UUID "00001108-0000-1000-8000-00805F9B34FB"
-#define HSP_AG_UUID "00001112-0000-1000-8000-00805F9B34FB"
+#define HSP_HS_UUID "00001108-0000-1000-8000-00805f9b34fb"
+#define HSP_AG_UUID "00001112-0000-1000-8000-00805f9b34fb"
-#define HFP_HS_UUID "0000111E-0000-1000-8000-00805F9B34FB"
-#define HFP_AG_UUID "0000111F-0000-1000-8000-00805F9B34FB"
+#define HFP_HS_UUID "0000111e-0000-1000-8000-00805f9b34fb"
+#define HFP_AG_UUID "0000111f-0000-1000-8000-00805f9b34fb"
-#define ADVANCED_AUDIO_UUID "0000110D-0000-1000-8000-00805F9B34FB"
+#define ADVANCED_AUDIO_UUID "0000110d-0000-1000-8000-00805f9b34fb"
-#define A2DP_SOURCE_UUID "0000110A-0000-1000-8000-00805F9B34FB"
-#define A2DP_SINK_UUID "0000110B-0000-1000-8000-00805F9B34FB"
+#define A2DP_SOURCE_UUID "0000110a-0000-1000-8000-00805f9b34fb"
+#define A2DP_SINK_UUID "0000110b-0000-1000-8000-00805f9b34fb"
-#define AVRCP_REMOTE_UUID "0000110E-0000-1000-8000-00805F9B34FB"
-#define AVRCP_TARGET_UUID "0000110C-0000-1000-8000-00805F9B34FB"
+#define AVRCP_REMOTE_UUID "0000110e-0000-1000-8000-00805f9b34fb"
+#define AVRCP_TARGET_UUID "0000110c-0000-1000-8000-00805f9b34fb"
/* Move these to respective .h files once they exist */
#define AUDIO_SOURCE_INTERFACE "org.bluez.AudioSource"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.76/audio/telephony-maemo6.c new/bluez-4.77/audio/telephony-maemo6.c
--- old/bluez-4.76/audio/telephony-maemo6.c 2010-10-14 17:18:02.000000000 +0200
+++ new/bluez-4.77/audio/telephony-maemo6.c 2010-10-25 21:00:00.000000000 +0200
@@ -784,8 +784,11 @@
switch (cmd[0]) {
case '0':
- foreach_call_with_status(CSD_CALL_STATUS_HOLD, release_call);
- foreach_call_with_status(CSD_CALL_STATUS_WAITING,
+ if (find_call_with_status(CSD_CALL_STATUS_WAITING))
+ foreach_call_with_status(CSD_CALL_STATUS_WAITING,
+ release_call);
+ else
+ foreach_call_with_status(CSD_CALL_STATUS_HOLD,
release_call);
break;
case '1':
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.76/btio/btio.c new/bluez-4.77/btio/btio.c
--- old/bluez-4.76/btio/btio.c 2010-10-03 01:25:27.000000000 +0200
+++ new/bluez-4.77/btio/btio.c 2010-10-25 21:00:00.000000000 +0200
@@ -839,6 +839,9 @@
}
memcpy(va_arg(args, uint8_t *), dev_class, 3);
break;
+ case BT_IO_OPT_MODE:
+ *(va_arg(args, uint8_t *)) = l2o.mode;
+ break;
default:
g_set_error(err, BT_IO_ERROR, BT_IO_ERROR_INVALID_ARGS,
"Unknown option %d", opt);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.76/compat/sdp.c new/bluez-4.77/compat/sdp.c
--- old/bluez-4.76/compat/sdp.c 2010-05-23 14:47:19.000000000 +0200
+++ new/bluez-4.77/compat/sdp.c 2010-10-25 21:00:00.000000000 +0200
@@ -152,7 +152,6 @@
&vendor, &product, &version, &subclass, &country,
&parser, desc, &req->flags, &pos);
- free(str);
req->vendor = vendor;
req->product = product;
@@ -163,6 +162,7 @@
snprintf(req->name, 128, "%s", str + pos);
+ free(str);
req->rd_size = strlen(desc) / 2;
req->rd_data = malloc(req->rd_size);
if (!req->rd_data) {
@@ -248,22 +248,23 @@
rec = (sdp_record_t *) hid_rsp->data;
- pdlist = sdp_data_get(rec, 0x0101);
- pdlist2 = sdp_data_get(rec, 0x0102);
- if (pdlist) {
- if (pdlist2) {
- if (strncmp(pdlist->val.str, pdlist2->val.str, 5)) {
- strncpy(req->name, pdlist2->val.str, sizeof(req->name) - 1);
- strcat(req->name, " ");
- }
- strncat(req->name, pdlist->val.str,
- sizeof(req->name) - strlen(req->name));
- } else
- strncpy(req->name, pdlist->val.str, sizeof(req->name) - 1);
- } else {
- pdlist2 = sdp_data_get(rec, 0x0100);
- if (pdlist2)
- strncpy(req->name, pdlist2->val.str, sizeof(req->name) - 1);
+ pdlist2 = sdp_data_get(rec, 0x0100);
+ if (pdlist2)
+ strncpy(req->name, pdlist2->val.str, sizeof(req->name) - 1);
+ else {
+ pdlist = sdp_data_get(rec, 0x0101);
+ pdlist2 = sdp_data_get(rec, 0x0102);
+ if (pdlist) {
+ if (pdlist2) {
+ if (strncmp(pdlist->val.str, pdlist2->val.str, 5)) {
+ strncpy(req->name, pdlist2->val.str, sizeof(req->name) - 1);
+ strcat(req->name, " ");
+ }
+ strncat(req->name, pdlist->val.str,
+ sizeof(req->name) - strlen(req->name));
+ } else
+ strncpy(req->name, pdlist->val.str, sizeof(req->name) - 1);
+ }
}
pdlist = sdp_data_get(rec, 0x0201);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.76/configure new/bluez-4.77/configure
--- old/bluez-4.76/configure 2010-10-14 17:18:43.000000000 +0200
+++ new/bluez-4.77/configure 2010-10-25 21:00:34.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for bluez 4.76.
+# Generated by GNU Autoconf 2.63 for bluez 4.77.
#
# 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.76'
-PACKAGE_STRING='bluez 4.76'
+PACKAGE_VERSION='4.77'
+PACKAGE_STRING='bluez 4.77'
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.76 to adapt to many kinds of systems.
+\`configure' configures bluez 4.77 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.76:";;
+ short | recursive ) echo "Configuration of bluez 4.77:";;
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.76
+bluez configure 4.77
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.76, which was
+It was created by bluez $as_me 4.77, 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.76'
+ VERSION='4.77'
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.76, which was
+This file was extended by bluez $as_me 4.77, 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.76
+bluez config.status 4.77
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.76/configure.ac new/bluez-4.77/configure.ac
--- old/bluez-4.76/configure.ac 2010-10-14 17:18:02.000000000 +0200
+++ new/bluez-4.77/configure.ac 2010-10-25 21:00:00.000000000 +0200
@@ -1,5 +1,5 @@
AC_PREREQ(2.60)
-AC_INIT(bluez, 4.76)
+AC_INIT(bluez, 4.77)
AM_INIT_AUTOMAKE([foreign subdir-objects])
AM_CONFIG_HEADER(config.h)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.76/health/hdp.c new/bluez-4.77/health/hdp.c
--- old/bluez-4.76/health/hdp.c 2010-10-14 17:18:02.000000000 +0200
+++ new/bluez-4.77/health/hdp.c 2010-10-25 21:00:00.000000000 +0200
@@ -339,7 +339,7 @@
"Can't get sender name");
}
- if (!set_app_path(app)){
+ if (!set_app_path(app)) {
free_application(app);
return g_dbus_create_error(msg,
ERROR_INTERFACE ".HealthError",
@@ -477,7 +477,7 @@
}
fd = mcap_mdl_get_fd(dc_data->hdp_chann->mdl);
- if (fd <= 0)
+ if (fd < 0)
reply = g_dbus_create_error(dc_data->msg,
ERROR_INTERFACE ".HealthError",
"Cannot get file descriptor");
@@ -568,7 +568,7 @@
}
fd = mcap_mdl_get_fd(data->hdp_chann->mdl);
- if (fd > 0)
+ if (fd >= 0)
return g_dbus_create_reply(data->msg, DBUS_TYPE_UNIX_FD, &fd,
DBUS_TYPE_INVALID);
@@ -629,17 +629,23 @@
return reply;
}
-static DBusMessage *channel_release(DBusConnection *conn,
- DBusMessage *msg, void *user_data)
+static void close_mdl(struct hdp_channel *hdp_chann)
{
- struct hdp_channel *hdp_chann = user_data;
int fd;
fd = mcap_mdl_get_fd(hdp_chann->mdl);
if (fd < 0)
- return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
+ return;
close(fd);
+}
+
+static DBusMessage *channel_release(DBusConnection *conn,
+ DBusMessage *msg, void *user_data)
+{
+ struct hdp_channel *hdp_chann = user_data;
+
+ close_mdl(hdp_chann);
return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
}
@@ -683,7 +689,7 @@
char *empty_path;
dev->fr = NULL;
- empty_path = "";
+ empty_path = "/";
emit_property_changed(dev->conn, device_get_path(dev->dev),
HEALTH_DEVICE, "MainChannel",
DBUS_TYPE_OBJECT_PATH, &empty_path);
@@ -826,6 +832,40 @@
return FALSE;
}
+static gboolean check_channel_conf(struct hdp_channel *chan)
+{
+ GError *err = NULL;
+ GIOChannel *io;
+ uint8_t mode;
+ int fd;
+
+ fd = mcap_mdl_get_fd(chan->mdl);
+ if (fd < 0)
+ return FALSE;
+ io = g_io_channel_unix_new(fd);
+
+ if (!bt_io_get(io, BT_IO_L2CAP, &err,
+ BT_IO_OPT_MODE, &mode,
+ BT_IO_OPT_INVALID)) {
+ error("Error: %s", err->message);
+ g_io_channel_unref(io);
+ g_error_free(err);
+ return FALSE;
+ }
+
+ g_io_channel_unref(io);
+
+ switch (chan->config) {
+ case HDP_RELIABLE_DC:
+ return mode == L2CAP_MODE_ERTM;
+ case HDP_STREAMING_DC:
+ return mode == L2CAP_MODE_STREAMING;
+ default:
+ error("Error: Connected with unknown configuration");
+ return FALSE;
+ }
+}
+
static void hdp_mcap_mdl_connected_cb(struct mcap_mdl *mdl, void *data)
{
struct hdp_device *dev = data;
@@ -842,6 +882,11 @@
if (!g_slist_find(dev->channels, chan))
dev->channels = g_slist_prepend(dev->channels, chan);
+ if (!check_channel_conf(chan)) {
+ close_mdl(chan);
+ return;
+ }
+
if (chan->mdep == HDP_MDEP_ECHO) {
GIOChannel *io;
int fd;
@@ -925,11 +970,18 @@
dev->ndc = NULL;
}
+static uint8_t hdp2l2cap_mode(uint8_t hdp_mode)
+{
+ return hdp_mode == HDP_STREAMING_DC ? L2CAP_MODE_STREAMING :
+ L2CAP_MODE_ERTM;
+}
+
static uint8_t hdp_mcap_mdl_conn_req_cb(struct mcap_mcl *mcl, uint8_t mdepid,
uint16_t mdlid, uint8_t *conf, void *data)
{
struct hdp_device *dev = data;
struct hdp_application *app;
+ GError *err = NULL;
GSList *l;
DBG("Data channel request");
@@ -951,6 +1003,13 @@
return MCAP_CONFIGURATION_REJECTED; /* not processed */
}
+ if (!mcap_set_data_chan_mode(dev->hdp_adapter->mi,
+ L2CAP_MODE_ERTM, &err)) {
+ error("Error: %s", err->message);
+ g_error_free(err);
+ return MCAP_MDL_BUSY;
+ }
+
dev->ndc = create_channel(dev, *conf, NULL, mdlid, NULL, NULL);
return MCAP_SUCCESS;
}
@@ -967,7 +1026,7 @@
case HDP_NO_PREFERENCE_DC:
if (app->role == HDP_SINK)
return MCAP_CONFIGURATION_REJECTED;
- else if (app->chan_type_set)
+ else if (dev->fr && app->chan_type_set)
*conf = app->chan_type;
else
*conf = HDP_RELIABLE_DC;
@@ -997,6 +1056,13 @@
g_free(path);
}
+ if (!mcap_set_data_chan_mode(dev->hdp_adapter->mi,
+ hdp2l2cap_mode(*conf), &err)) {
+ error("Error: %s", err->message);
+ g_error_free(err);
+ return MCAP_MDL_BUSY;
+ }
+
dev->ndc = create_channel(dev, *conf, NULL, mdlid, app, NULL);
if (!dev->ndc)
return MCAP_MDL_BUSY;
@@ -1008,6 +1074,7 @@
{
struct hdp_device *dev = data;
struct hdp_channel *chan;
+ GError *err = NULL;
GSList *l;
l = g_slist_find_custom(dev->channels, mdl, cmp_chan_mdl);
@@ -1020,6 +1087,13 @@
(chan->mdep != HDP_MDEP_ECHO))
return MCAP_UNSPECIFIED_ERROR;
+ if (!mcap_set_data_chan_mode(dev->hdp_adapter->mi,
+ hdp2l2cap_mode(chan->config), &err)) {
+ error("Error: %s", err->message);
+ g_error_free(err);
+ return MCAP_MDL_BUSY;
+ }
+
dev->ndc = chan;
return MCAP_SUCCESS;
@@ -1148,8 +1222,8 @@
if (!dev->sdp_present)
to_delete = g_slist_append(to_delete, dev);
-
- remove_channels(dev);
+ else
+ remove_channels(dev);
}
for (l = to_delete; l; l = l->next) {
@@ -1474,6 +1548,7 @@
{
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 +1573,20 @@
DBUS_TYPE_OBJECT_PATH, &hdp_chann->path,
DBUS_TYPE_INVALID);
g_dbus_send_message(hdp_conn->conn, reply);
+
+ if (!check_channel_conf(hdp_chann)) {
+ close_mdl(hdp_chann);
+ return;
+ }
+
+ 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,
@@ -1906,6 +1995,9 @@
DBG("Unregistered interface %s on path %s", HEALTH_DEVICE,
device_get_path(device->dev));
+
+ remove_channels(device);
+
devices = g_slist_remove(devices, device);
free_health_device(device);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.76/health/hdp_util.c new/bluez-4.77/health/hdp_util.c
--- old/bluez-4.76/health/hdp_util.c 2010-10-14 17:18:02.000000000 +0200
+++ new/bluez-4.77/health/hdp_util.c 2010-10-25 21:00:00.000000000 +0200
@@ -181,8 +181,9 @@
dbus_message_iter_recurse(iter, &value);
ctype = dbus_message_iter_get_arg_type(&value);
string = &value;
- } else
+ } else {
string = iter;
+ }
if (ctype != DBUS_TYPE_STRING) {
g_set_error(err, HDP_ERROR, HDP_UNSPECIFIED_ERROR,
@@ -191,11 +192,11 @@
}
dbus_message_iter_get_basic(string, &role);
- if (g_ascii_strcasecmp(role, HDP_SINK_ROLE_AS_STRING) == 0)
+ if (g_ascii_strcasecmp(role, HDP_SINK_ROLE_AS_STRING) == 0) {
app->role = HDP_SINK;
- else if (g_ascii_strcasecmp(role, HDP_SOURCE_ROLE_AS_STRING) == 0)
+ } else if (g_ascii_strcasecmp(role, HDP_SOURCE_ROLE_AS_STRING) == 0) {
app->role = HDP_SOURCE;
- else {
+ } else {
g_set_error(err, HDP_ERROR, HDP_UNSPECIFIED_ERROR,
"Role value should be \"source\" or \"sink\"");
return FALSE;
@@ -221,8 +222,9 @@
dbus_message_iter_recurse(iter, &variant);
ctype = dbus_message_iter_get_arg_type(&variant);
string = &variant;
- } else
+ } else {
string = iter;
+ }
if (ctype != DBUS_TYPE_STRING) {
g_set_error(err, HDP_ERROR, HDP_DIC_ENTRY_PARSE_ERROR,
@@ -240,6 +242,7 @@
{
struct hdp_application *app = data;
DBusMessageIter *value;
+ char *chan_type;
int ctype;
ctype = dbus_message_iter_get_arg_type(iter);
@@ -253,15 +256,19 @@
value = &variant;
}
- if (ctype != DBUS_TYPE_UINT16) {
+ if (ctype != DBUS_TYPE_STRING) {
g_set_error(err, HDP_ERROR, HDP_DIC_ENTRY_PARSE_ERROR,
- "Final value for channel type should be a uint16");
+ "Final value for channel type should be an string");
return FALSE;
}
- dbus_message_iter_get_basic(value, &app->chan_type);
- if (app->chan_type < HDP_RELIABLE_DC ||
- app->chan_type > HDP_STREAMING_DC) {
+ dbus_message_iter_get_basic(value, &chan_type);
+
+ if (g_ascii_strcasecmp("Reliable", chan_type) == 0)
+ app->chan_type = HDP_RELIABLE_DC;
+ else if (g_ascii_strcasecmp("Streaming", chan_type) == 0)
+ app->chan_type = HDP_STREAMING_DC;
+ else {
g_set_error(err, HDP_ERROR, HDP_DIC_ENTRY_PARSE_ERROR,
"Invalid value for data type");
return FALSE;
@@ -346,8 +353,9 @@
{
gboolean ret;
uuid_t l2cap_uuid, mcap_c_uuid;
- sdp_list_t *l2cap_list, *proto_list, *mcap_list, *access_proto_list;
- sdp_data_t *psm, *mcap_ver;
+ sdp_list_t *l2cap_list, *proto_list = NULL, *mcap_list = NULL;
+ sdp_list_t *access_proto_list = NULL;
+ sdp_data_t *psm = NULL, *mcap_ver = NULL;
uint16_t version = MCAP_VERSION;
/* set l2cap information */
@@ -389,12 +397,12 @@
goto end;
}
- if (!sdp_list_append( mcap_list, mcap_ver)) {
+ if (!sdp_list_append(mcap_list, mcap_ver)) {
ret = FALSE;
goto end;
}
- if (!sdp_list_append( proto_list, mcap_list)) {
+ if (!sdp_list_append(proto_list, mcap_list)) {
ret = FALSE;
goto end;
}
@@ -436,7 +444,7 @@
sdp_profile_desc_t hdp_profile;
/* set hdp information */
- sdp_uuid16_create( &hdp_profile.uuid, HDP_SVCLASS_ID);
+ sdp_uuid16_create(&hdp_profile.uuid, HDP_SVCLASS_ID);
hdp_profile.version = HDP_VERSION;
profile_list = sdp_list_append(NULL, &hdp_profile);
if (!profile_list)
@@ -453,13 +461,14 @@
return ret;
}
-static gboolean register_service_aditional_protocols(
+static gboolean register_service_additional_protocols(
struct hdp_adapter *adapter,
sdp_record_t *sdp_record)
{
gboolean ret;
uuid_t l2cap_uuid, mcap_d_uuid;
- sdp_list_t *l2cap_list, *proto_list, *mcap_list, *access_proto_list;
+ sdp_list_t *l2cap_list, *proto_list = NULL, *mcap_list = NULL;
+ sdp_list_t *access_proto_list = NULL;
sdp_data_t *psm = NULL;
/* set l2cap information */
@@ -495,7 +504,7 @@
goto end;
}
- if (!sdp_list_append( proto_list, mcap_list)) {
+ if (!sdp_list_append(proto_list, mcap_list)) {
ret = FALSE;
goto end;
}
@@ -529,8 +538,11 @@
static sdp_list_t *app_to_sdplist(struct hdp_application *app)
{
- sdp_data_t *mdepid, *dtype, *role, *desc;
- sdp_list_t *f_list;
+ sdp_data_t *mdepid,
+ *dtype = NULL,
+ *role = NULL,
+ *desc = NULL;
+ sdp_list_t *f_list = NULL;
mdepid = sdp_data_alloc(SDP_UINT8, &app->id);
if (!mdepid)
@@ -699,7 +711,7 @@
goto fail;
if (!register_service_profiles(sdp_record))
goto fail;
- if (!register_service_aditional_protocols(adapter, sdp_record))
+ if (!register_service_additional_protocols(adapter, sdp_record))
goto fail;
sdp_set_info_attr(sdp_record, HDP_SERVICE_NAME, HDP_SERVICE_PROVIDER,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.76/health/mcap.c new/bluez-4.77/health/mcap.c
--- old/bluez-4.76/health/mcap.c 2010-10-14 17:18:02.000000000 +0200
+++ new/bluez-4.77/health/mcap.c 2010-10-25 21:00:00.000000000 +0200
@@ -1677,8 +1677,6 @@
con->destroy = destroy;
con->user_data = user_data;
- /* TODO: Check if BtIOType is ERTM or Streaming before continue */
-
mdl->dc = bt_io_connect(BT_IO_L2CAP, mcap_connect_mdl_cb, con,
mdl_io_destroy, err,
BT_IO_OPT_SOURCE_BDADDR, &mdl->mcl->ms->src,
@@ -2133,3 +2131,16 @@
return lpsm;
}
+
+gboolean mcap_set_data_chan_mode(struct mcap_instance *mi, uint8_t mode,
+ GError **err)
+{
+ if (!(mi && mi->dcio)) {
+ g_set_error(err, MCAP_ERROR, MCAP_ERROR_INVALID_ARGS,
+ "Invalid MCAP instance");
+ return FALSE;
+ }
+
+ return bt_io_set(mi->dcio, BT_IO_L2CAP, err, BT_IO_OPT_MODE, mode,
+ BT_IO_OPT_INVALID);
+}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.76/health/mcap_lib.h new/bluez-4.77/health/mcap_lib.h
--- old/bluez-4.76/health/mcap_lib.h 2010-10-14 17:18:02.000000000 +0200
+++ new/bluez-4.77/health/mcap_lib.h 2010-10-25 21:00:00.000000000 +0200
@@ -69,7 +69,7 @@
/************ Callbacks ************/
-/* mdl callbacks */
+/* MDL callbacks */
typedef void (* mcap_mdl_event_cb) (struct mcap_mdl *mdl, gpointer data);
typedef void (* mcap_mdl_operation_conf_cb) (struct mcap_mdl *mdl, uint8_t conf,
@@ -85,7 +85,7 @@
typedef uint8_t (* mcap_remote_mdl_reconn_req_cb) (struct mcap_mdl *mdl,
gpointer data);
-/* mcl callbacks */
+/* MCL callbacks */
typedef void (* mcap_mcl_event_cb) (struct mcap_mcl *mcl, gpointer data);
typedef void (* mcap_mcl_connect_cb) (struct mcap_mcl *mcl, GError *err,
@@ -115,7 +115,7 @@
/************ Operations ************/
-/* Mdl operations*/
+/* MDL operations */
gboolean mcap_create_mdl(struct mcap_mcl *mcl,
uint8_t mdepid,
@@ -155,7 +155,7 @@
int mcap_mdl_get_fd(struct mcap_mdl *mdl);
uint16_t mcap_mdl_get_mdlid(struct mcap_mdl *mdl);
-/* Mcl operations*/
+/* MCL operations */
gboolean mcap_create_mcl(struct mcap_instance *ms,
const bdaddr_t *addr,
@@ -213,6 +213,9 @@
uint16_t mcap_get_ctrl_psm(struct mcap_instance *mi, GError **err);
uint16_t mcap_get_data_psm(struct mcap_instance *mi, GError **err);
+gboolean mcap_set_data_chan_mode(struct mcap_instance *mi, uint8_t mode,
+ GError **err);
+
#ifdef __cplusplus
}
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.76/health/mcap_sync.c new/bluez-4.77/health/mcap_sync.c
--- old/bluez-4.76/health/mcap_sync.c 2010-09-21 18:41:10.000000000 +0200
+++ new/bluez-4.77/health/mcap_sync.c 2010-10-25 21:00:00.000000000 +0200
@@ -350,7 +350,7 @@
clock_gettime(CLK, &t1);
read_btclock_retry(mcl, &btclock, &btaccuracy);
- /* Do clock read a number of times and measure latency */
+ /* Read clock a number of times and measure latency */
avg = 0;
i = 0;
retries = MAX_RETRIES;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.76/src/adapter.c new/bluez-4.77/src/adapter.c
--- old/bluez-4.76/src/adapter.c 2010-10-14 17:18:02.000000000 +0200
+++ new/bluez-4.77/src/adapter.c 2010-10-25 21:00:00.000000000 +0200
@@ -1099,9 +1099,13 @@
uuids = g_new0(char *, sdp_list_len(adapter->services) + 1);
- for (i = 0, list = adapter->services; list; list = list->next, i++) {
+ for (i = 0, list = adapter->services; list; list = list->next) {
+ char *uuid;
sdp_record_t *rec = list->data;
- uuids[i] = bt_uuid2string(&rec->svclass);
+
+ uuid = bt_uuid2string(&rec->svclass);
+ if (uuid)
+ uuids[i++] = uuid;
}
emit_array_property_changed(connection, adapter->path,
@@ -1426,9 +1430,13 @@
/* UUIDs */
uuids = g_new0(char *, sdp_list_len(adapter->services) + 1);
- for (i = 0, list = adapter->services; list; list = list->next, i++) {
+ for (i = 0, list = adapter->services; list; list = list->next) {
sdp_record_t *rec = list->data;
- uuids[i] = bt_uuid2string(&rec->svclass);
+ char *uuid;
+
+ uuid = bt_uuid2string(&rec->svclass);
+ if (uuid)
+ uuids[i++] = uuid;
}
dict_append_array(&dict, "UUIDs", DBUS_TYPE_STRING, &uuids, i);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.76/src/manager.c new/bluez-4.77/src/manager.c
--- old/bluez-4.76/src/manager.c 2010-08-25 07:10:02.000000000 +0200
+++ new/bluez-4.77/src/manager.c 2010-10-25 21:00:00.000000000 +0200
@@ -197,13 +197,14 @@
DBUS_DICT_ENTRY_END_CHAR_AS_STRING, &dict);
array = g_new0(char *, g_slist_length(adapters) + 1);
- for (i = 0, list = adapters; list; list = list->next, i++) {
+ for (i = 0, list = adapters; list; list = list->next) {
struct btd_adapter *adapter = list->data;
if (!adapter_is_ready(adapter))
continue;
array[i] = (char *) adapter_get_path(adapter);
+ i++;
}
dict_append_array(&dict, "Adapters", DBUS_TYPE_OBJECT_PATH, &array, i);
g_free(array);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.76/src/security.c new/bluez-4.77/src/security.c
--- old/bluez-4.76/src/security.c 2010-10-14 17:18:02.000000000 +0200
+++ new/bluez-4.77/src/security.c 2010-10-25 21:00:00.000000000 +0200
@@ -56,22 +56,6 @@
#include "storage.h"
#include "manager.h"
-typedef enum {
- REQ_PENDING,
- REQ_SENT
-} req_status_t;
-
-struct hci_req_data {
- int dev_id;
- int event;
- req_status_t status;
- bdaddr_t dba;
- uint16_t ogf;
- uint16_t ocf;
- void *cparam;
- int clen;
-};
-
struct g_io_info {
GIOChannel *channel;
int watch_id;
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org