Hello community,
here is the log from the commit of package bluez for openSUSE:Factory
checked in at Tue Nov 10 10:37:31 CET 2009.
--------
--- bluez/bluez.changes 2009-10-20 23:57:01.000000000 +0200
+++ /mounts/work_src_done/STABLE/bluez/bluez.changes 2009-11-02 22:50:41.000000000 +0100
@@ -1,0 +2,13 @@
+Mon Nov 2 21:51:12 CET 2009 - seife@opensuse.org
+
+- update to bluez-4.57:
+ - Fix unloading of drivers for uninitialized adapters.
+ - Fix debug message to use requested and not opened SEID.
+ - Fix codec selection for GStreamer plugin.
+ - Fix deleting of SDP records during service updates.
+ - Fix deleting of SDP records when a device is removed.
+ - Fix handling when the SDP record is modified on remote device.
+ - Fix potential buffer overflow by using snprintf instead of sprintf.
+ - Fix const declarations for some storage function parameters.
+
+-------------------------------------------------------------------
--- bluez/bluez-gstreamer.changes 2009-10-10 23:33:08.000000000 +0200
+++ /mounts/work_src_done/STABLE/bluez/bluez-gstreamer.changes 2009-11-02 22:50:39.000000000 +0100
@@ -1,0 +2,19 @@
+Mon Nov 2 21:51:12 CET 2009 - seife@opensuse.org
+
+- update to bluez-4.57:
+ - Fix unloading of drivers for uninitialized adapters.
+ - Fix debug message to use requested and not opened SEID.
+ - Fix codec selection for GStreamer plugin.
+ - Fix deleting of SDP records during service updates.
+ - Fix deleting of SDP records when a device is removed.
+ - Fix handling when the SDP record is modified on remote device.
+ - Fix potential buffer overflow by using snprintf instead of sprintf.
+ - Fix const declarations for some storage function parameters.
+
+-------------------------------------------------------------------
+Mon Oct 19 10:39:02 CEST 2009 - vlado@suse.cz
+
+- 001-remove-rule-dell-mouse.patch added to disable udev action
+ for dell mouse; bnc#522287
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
bluez-4.56.tar.bz2
New:
----
bluez-4.57.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ bluez-gstreamer.spec ++++++
--- /var/tmp/diff_new_pack.sKMkjH/_old 2009-11-10 10:32:23.000000000 +0100
+++ /var/tmp/diff_new_pack.sKMkjH/_new 2009-11-10 10:32:23.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package bluez-gstreamer (Version 4.56)
+# spec file for package bluez-gstreamer (Version 4.57)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -24,7 +24,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.56
+Version: 4.57
Release: 1
Summary: Bluetooth Sound Support
Group: Productivity/Multimedia/Sound/Utilities
++++++ bluez.spec ++++++
--- /var/tmp/diff_new_pack.sKMkjH/_old 2009-11-10 10:32:23.000000000 +0100
+++ /var/tmp/diff_new_pack.sKMkjH/_new 2009-11-10 10:32:23.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package bluez (Version 4.56)
+# spec file for package bluez (Version 4.57)
#
# 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 pkg-config udev
Url: http://www.bluez.org
-Version: 4.56
+Version: 4.57
Release: 1
Summary: Bluetooth Stack for Linux
Group: Hardware/Mobile
++++++ bluez-4.56.tar.bz2 -> bluez-4.57.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.56/audio/audio.conf new/bluez-4.57/audio/audio.conf
--- old/bluez-4.56/audio/audio.conf 2009-05-04 01:00:28.000000000 +0200
+++ new/bluez-4.57/audio/audio.conf 2009-10-31 08:18:09.000000000 +0100
@@ -30,7 +30,7 @@
HFP=true
# Maximum number of connected HSP/HFP devices per adapter. Defaults to 1
-MaxConnections=1
+MaxConnected=1
# Just an example of potential config options for the other interfaces
#[A2DP]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.56/audio/gstavdtpsink.c new/bluez-4.57/audio/gstavdtpsink.c
--- old/bluez-4.56/audio/gstavdtpsink.c 2009-07-18 21:50:32.000000000 +0200
+++ new/bluez-4.57/audio/gstavdtpsink.c 2009-10-31 08:18:09.000000000 +0100
@@ -1089,6 +1089,7 @@
req->h.type = BT_REQUEST;
req->h.name = BT_SET_CONFIGURATION;
req->h.length = sizeof(*req);
+ memcpy(&req->codec, codec, sizeof(req->codec));
if (codec->type == BT_A2DP_SBC_SINK)
ret = gst_avdtp_sink_init_sbc_pkt_conf(self, caps,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.56/audio/telephony-ofono.c new/bluez-4.57/audio/telephony-ofono.c
--- old/bluez-4.56/audio/telephony-ofono.c 2009-07-06 22:21:40.000000000 +0200
+++ new/bluez-4.57/audio/telephony-ofono.c 2009-10-31 08:18:09.000000000 +0100
@@ -131,12 +131,6 @@
return NULL;
}
-static inline DBusMessage *invalid_args(DBusMessage *msg)
-{
- return g_dbus_create_error(msg, "org.bluez.Error.InvalidArguments",
- "Invalid arguments in method call");
-}
-
void telephony_device_connected(void *telephony_device)
{
debug("telephony-ofono: device %p connected", telephony_device);
@@ -277,18 +271,19 @@
void telephony_dial_number_req(void *telephony_device, const char *number)
{
- char *clir = "default";
+ const char *clir;
int ret;
debug("telephony-ofono: dial request to %s", number);
if (!strncmp(number, "*31#", 4)) {
number += 4;
- clir = g_strdup("enabled");
+ clir = "enabled";
} else if (!strncmp(number, "#31#", 4)) {
number += 4;
- clir = g_strdup("disabled");
- }
+ clir = "disabled";
+ } else
+ clir = "default";
ret = send_method_call(OFONO_BUS_NAME, modem_obj_path,
OFONO_VCMANAGER_INTERFACE,
@@ -417,7 +412,7 @@
static void handle_registration_property(const char *property, DBusMessageIter sub)
{
- char *status, *operator;
+ const char *status, *operator;
unsigned int signals_bar;
if (g_str_equal(property, "Status")) {
@@ -627,7 +622,7 @@
err.name, err.message);
dbus_error_free(&err);
goto done;
- }
+ }
vc = find_vc(path);
if (!vc) {
@@ -640,28 +635,28 @@
if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_ARRAY) {
error("Unexpected signature in vc_getproperties_reply()");
goto done;
- }
+ }
dbus_message_iter_recurse(&iter, &iter_entry);
if (dbus_message_iter_get_arg_type(&iter_entry)
- != DBUS_TYPE_DICT_ENTRY) {
+ != DBUS_TYPE_DICT_ENTRY) {
error("Unexpected signature in vc_getproperties_reply()");
goto done;
- }
+ }
while (dbus_message_iter_get_arg_type(&iter_entry)
- != DBUS_TYPE_INVALID) {
+ != DBUS_TYPE_INVALID) {
DBusMessageIter iter_property, sub;
char *property, *cli, *state;
dbus_message_iter_recurse(&iter_entry, &iter_property);
if (dbus_message_iter_get_arg_type(&iter_property)
- != DBUS_TYPE_STRING) {
+ != DBUS_TYPE_STRING) {
error("Unexpected signature in"
" vc_getproperties_reply()");
goto done;
- }
+ }
dbus_message_iter_get_basic(&iter_property, &property);
@@ -729,7 +724,7 @@
{
DBusMessageIter iter, sub, array;
const char *property, *vc_obj_path = NULL;
- struct voice_call *vc = NULL, *vc_new = NULL;
+ struct voice_call *vc, *vc_new = NULL;
debug("in handle_vcmanager_property_changed");
@@ -790,7 +785,7 @@
{
DBusMessageIter iter, sub;
const char *property, *state;
- struct voice_call *vc = NULL;
+ struct voice_call *vc;
debug("in handle_vc_property_changed, obj_path is %s", obj_path);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.56/audio/unix.c new/bluez-4.57/audio/unix.c
--- old/bluez-4.56/audio/unix.c 2009-10-10 06:17:28.000000000 +0200
+++ new/bluez-4.57/audio/unix.c 2009-10-31 08:18:09.000000000 +0100
@@ -1535,7 +1535,7 @@
if (req->codec.seid != client->seid) {
error("Unable to set configuration: seid %d not opened",
- client->seid);
+ req->codec.seid);
goto failed;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.56/AUTHORS new/bluez-4.57/AUTHORS
--- old/bluez-4.56/AUTHORS 2009-07-03 00:43:14.000000000 +0200
+++ new/bluez-4.57/AUTHORS 2009-10-31 08:18:09.000000000 +0100
@@ -44,3 +44,4 @@
Ilya Rubtsov
Mario Limonciello
Filippo Giunchedi
+Jaikumar Ganesh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.56/ChangeLog new/bluez-4.57/ChangeLog
--- old/bluez-4.56/ChangeLog 2009-10-10 06:17:28.000000000 +0200
+++ new/bluez-4.57/ChangeLog 2009-10-31 08:18:09.000000000 +0100
@@ -1,3 +1,13 @@
+ver 4.57:
+ Fix unloading of drivers for uninitialized adapters.
+ Fix debug message to use requested and not opened SEID.
+ Fix codec selection for GStreamer plugin.
+ Fix deleting of SDP records during service updates.
+ Fix deleting of SDP records when a device is removed.
+ Fix handling when the SDP record is modified on remote device.
+ Fix potential buffer overflow by using snprintf instead of sprintf.
+ Fix const declarations for some storage function parameters.
+
ver 4.56:
Add missing values from Bluetooth 3.0 specification.
Add proper tracking of device paired status.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.56/compat/dund.c new/bluez-4.57/compat/dund.c
--- old/bluez-4.56/compat/dund.c 2009-10-04 05:56:37.000000000 +0200
+++ new/bluez-4.57/compat/dund.c 2009-10-31 08:18:09.000000000 +0100
@@ -192,7 +192,7 @@
}
ba2str(&sa.rc_bdaddr, ba);
- sprintf(ch, "%d", channel);
+ snprintf(ch, sizeof(ch), "%d", channel);
/* Setup environment */
setenv("DUN_BDADDR", ba, 1);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.56/configure new/bluez-4.57/configure
--- old/bluez-4.56/configure 2009-10-10 06:18:30.000000000 +0200
+++ new/bluez-4.57/configure 2009-10-31 08:19:03.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.56.
+# Generated by GNU Autoconf 2.63 for bluez 4.57.
#
# 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.56'
-PACKAGE_STRING='bluez 4.56'
+PACKAGE_VERSION='4.57'
+PACKAGE_STRING='bluez 4.57'
PACKAGE_BUGREPORT=''
ac_default_prefix=/usr/local
@@ -1592,7 +1592,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.56 to adapt to many kinds of systems.
+\`configure' configures bluez 4.57 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1662,7 +1662,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of bluez 4.56:";;
+ short | recursive ) echo "Configuration of bluez 4.57:";;
esac
cat <<\_ACEOF
@@ -1820,7 +1820,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-bluez configure 4.56
+bluez configure 4.57
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1834,7 +1834,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.56, which was
+It was created by bluez $as_me 4.57, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -2684,7 +2684,7 @@
# Define the identity of the package.
PACKAGE='bluez'
- VERSION='4.56'
+ VERSION='4.57'
cat >>confdefs.h <<_ACEOF
@@ -14145,7 +14145,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.56, which was
+This file was extended by bluez $as_me 4.57, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -14208,7 +14208,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-bluez config.status 4.56
+bluez config.status 4.57
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.56/configure.ac new/bluez-4.57/configure.ac
--- old/bluez-4.56/configure.ac 2009-10-10 06:17:28.000000000 +0200
+++ new/bluez-4.57/configure.ac 2009-10-31 08:18:09.000000000 +0100
@@ -1,5 +1,5 @@
AC_PREREQ(2.60)
-AC_INIT(bluez, 4.56)
+AC_INIT(bluez, 4.57)
AM_INIT_AUTOMAKE([foreign subdir-objects])
AM_CONFIG_HEADER(config.h)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.56/gdbus/mainloop.c new/bluez-4.57/gdbus/mainloop.c
--- old/bluez-4.56/gdbus/mainloop.c 2009-08-16 20:43:34.000000000 +0200
+++ new/bluez-4.57/gdbus/mainloop.c 2009-10-31 08:18:09.000000000 +0100
@@ -272,6 +272,9 @@
setup_dbus_with_main_loop(conn);
+ if (dbus_connection_get_dispatch_status(conn) == DBUS_DISPATCH_DATA_REMAINS)
+ g_timeout_add(DISPATCH_TIMEOUT, message_dispatch_cb, conn);
+
return conn;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.56/plugins/hciops.c new/bluez-4.57/plugins/hciops.c
--- old/bluez-4.56/plugins/hciops.c 2009-08-16 20:43:34.000000000 +0200
+++ new/bluez-4.57/plugins/hciops.c 2009-10-31 08:18:09.000000000 +0100
@@ -26,13 +26,8 @@
#include
#include
-#include
#include
#include
-#include
-#include
-#include
-#include
#include
#include
#include
@@ -43,15 +38,12 @@
#include
-#include
-
#include "hcid.h"
#include "sdpd.h"
#include "adapter.h"
#include "plugin.h"
#include "logging.h"
#include "manager.h"
-#include "storage.h"
static int child_pipe[2] = { -1, -1 };
@@ -88,7 +80,7 @@
{
struct hci_dev_info di;
uint16_t policy;
- int dd;
+ int dd, err;
if (hci_devinfo(index, &di) < 0)
return;
@@ -98,8 +90,9 @@
dd = hci_open_dev(index);
if (dd < 0) {
+ err = errno;
error("Can't open device hci%d: %s (%d)",
- index, strerror(errno), errno);
+ index, strerror(err), err);
return;
}
@@ -125,7 +118,7 @@
struct hci_dev_req dr;
struct hci_dev_info di;
pid_t pid;
- int dd;
+ int dd, err;
/* Do initialization in the separate process */
pid = fork();
@@ -134,8 +127,9 @@
atexit(at_child_exit);
break;
case -1:
+ err = errno;
error("Fork failed. Can't init device hci%d: %s (%d)",
- index, strerror(errno), errno);
+ index, strerror(err), err);
default:
debug("child %d forked", pid);
return;
@@ -143,8 +137,9 @@
dd = hci_open_dev(index);
if (dd < 0) {
+ err = errno;
error("Can't open device hci%d: %s (%d)",
- index, strerror(errno), errno);
+ index, strerror(err), err);
exit(1);
}
@@ -154,8 +149,9 @@
/* Set link mode */
dr.dev_opt = main_opts.link_mode;
if (ioctl(dd, HCISETLINKMODE, (unsigned long) &dr) < 0) {
+ err = errno;
error("Can't set link mode on hci%d: %s (%d)",
- index, strerror(errno), errno);
+ index, strerror(err), err);
}
/* Set link policy */
@@ -251,29 +247,27 @@
dl = g_try_malloc0(HCI_MAX_DEV * sizeof(struct hci_dev_req) + sizeof(uint16_t));
if (!dl) {
- err = -errno;
+ err = errno;
error("Can't allocate devlist buffer: %s (%d)",
- strerror(errno), errno);
- return err;
+ strerror(err), err);
+ return -err;
}
dl->dev_num = HCI_MAX_DEV;
dr = dl->dev_req;
if (ioctl(ctl, HCIGETDEVLIST, (void *) dl) < 0) {
- err = -errno;
+ err = errno;
error("Can't get device list: %s (%d)",
- strerror(errno), errno);
- return err;
+ strerror(err), err);
+ g_free(dl);
+ return -err;
}
for (i = 0; i < dl->dev_num; i++, dr++) {
- gboolean devup;
-
device_event(HCI_DEV_REG, dr->dev_id);
- devup = hci_test_bit(HCI_UP, &dr->dev_opt);
- if (devup)
+ if (hci_test_bit(HCI_UP, &dr->dev_opt))
device_event(HCI_DEV_UP, dr->dev_id);
}
@@ -337,9 +331,9 @@
return -EALREADY;
if (pipe(child_pipe) < 0) {
- err = -errno;
- error("pipe(): %s (%d)", strerror(errno), errno);
- return err;
+ err = errno;
+ error("pipe(): %s (%d)", strerror(err), err);
+ return -err;
}
child_io = g_io_channel_unix_new(child_pipe[0]);
@@ -352,10 +346,10 @@
/* Create and bind HCI socket */
sock = socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI);
if (sock < 0) {
- err = -errno;
- error("Can't open HCI socket: %s (%d)", strerror(errno),
- errno);
- return err;
+ err = errno;
+ error("Can't open HCI socket: %s (%d)", strerror(err),
+ err);
+ return -err;
}
/* Set filter */
@@ -364,9 +358,9 @@
hci_filter_set_event(EVT_STACK_INTERNAL, &flt);
if (setsockopt(sock, SOL_HCI, HCI_FILTER, &flt,
sizeof(flt)) < 0) {
- err = -errno;
- error("Can't set filter: %s (%d)", strerror(errno), errno);
- return err;
+ err = errno;
+ error("Can't set filter: %s (%d)", strerror(err), err);
+ return -err;
}
memset(&addr, 0, sizeof(addr));
@@ -374,10 +368,10 @@
addr.hci_dev = HCI_DEV_NONE;
if (bind(sock, (struct sockaddr *) &addr,
sizeof(addr)) < 0) {
- err = -errno;
+ err = errno;
error("Can't bind HCI socket: %s (%d)",
- strerror(errno), errno);
- return err;
+ strerror(err), err);
+ return -err;
}
ctl_io = g_io_channel_unix_new(sock);
@@ -427,14 +421,14 @@
goto done; /* on success */
if (errno != EALREADY) {
- err = -errno;
+ err = errno;
error("Can't init device hci%d: %s (%d)",
- index, strerror(errno), errno);
+ index, strerror(err), err);
}
done:
hci_close_dev(dd);
- return err;
+ return -err;
}
static int hciops_stop(int index)
@@ -450,14 +444,14 @@
goto done; /* on success */
if (errno != EALREADY) {
- err = -errno;
+ err = errno;
error("Can't stop device hci%d: %s (%d)",
- index, strerror(errno), errno);
+ index, strerror(err), err);
}
done:
hci_close_dev(dd);
- return err;
+ return -err;
}
static int hciops_powered(int index, gboolean powered)
@@ -539,7 +533,7 @@
static int hciops_set_limited_discoverable(int index, uint32_t class,
gboolean limited)
{
- int dd, err = 0;
+ int dd;
int num = (limited ? 2 : 1);
uint8_t lap[] = { 0x33, 0x8b, 0x9e, 0x00, 0x8b, 0x9e };
write_current_iac_lap_cp cp;
@@ -556,8 +550,8 @@
cp.num_current_iac = num;
memcpy(&cp.lap, lap, num * 3);
- err = hci_send_cmd(dd, OGF_HOST_CTL, OCF_WRITE_CURRENT_IAC_LAP,
- (num * 3 + 1), &cp);
+ hci_send_cmd(dd, OGF_HOST_CTL, OCF_WRITE_CURRENT_IAC_LAP,
+ (num * 3 + 1), &cp);
hci_close_dev(dd);
@@ -567,7 +561,7 @@
static int hciops_start_discovery(int index, gboolean periodic)
{
uint8_t lap[3] = { 0x33, 0x8b, 0x9e };
- int dd, err = 0;
+ int dd, err;
dd = hci_open_dev(index);
if (dd < 0)
@@ -608,7 +602,7 @@
static int hciops_stop_discovery(int index)
{
struct hci_dev_info di;
- int dd, err = 0;
+ int dd, err;
if (hci_devinfo(index, &di) < 0)
return -errno;
@@ -634,7 +628,7 @@
static int hciops_resolve_name(int index, bdaddr_t *bdaddr)
{
remote_name_req_cp cp;
- int dd, err = 0;
+ int dd, err;
dd = hci_open_dev(index);
if (dd < 0)
@@ -657,7 +651,7 @@
static int hciops_set_name(int index, const char *name)
{
change_local_name_cp cp;
- int dd, err = 0;
+ int dd, err;
dd = hci_open_dev(index);
if (dd < 0)
@@ -678,7 +672,7 @@
static int hciops_read_name(int index)
{
- int dd, err = 0;
+ int dd, err;
dd = hci_open_dev(index);
if (dd < 0)
@@ -696,7 +690,7 @@
static int hciops_cancel_resolve_name(int index, bdaddr_t *bdaddr)
{
remote_name_req_cancel_cp cp;
- int dd, err = 0;
+ int dd, err;
dd = hci_open_dev(index);
if (dd < 0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.56/src/adapter.c new/bluez-4.57/src/adapter.c
--- old/bluez-4.56/src/adapter.c 2009-10-10 06:17:28.000000000 +0200
+++ new/bluez-4.57/src/adapter.c 2009-10-31 08:18:09.000000000 +0100
@@ -29,7 +29,6 @@
#define _GNU_SOURCE
#include
#include
-#include
#include
#include
#include
@@ -37,9 +36,7 @@
#include
#include
#include
-#include
#include
-#include
#include
#include
@@ -50,7 +47,6 @@
#include "hcid.h"
#include "sdpd.h"
-#include "sdp-xml.h"
#include "manager.h"
#include "adapter.h"
#include "device.h"
@@ -61,8 +57,6 @@
#include "agent.h"
#include "storage.h"
-#define NUM_ELEMENTS(table) (sizeof(table)/sizeof(const char *))
-
#define IO_CAPABILITY_DISPLAYONLY 0x00
#define IO_CAPABILITY_DISPLAYYESNO 0x01
#define IO_CAPABILITY_KEYBOARDONLY 0x02
@@ -114,8 +108,6 @@
* resloving */
GSList *found_devices;
GSList *oor_devices; /* out of range device list */
- DBusMessage *discovery_cancel; /* discovery cancel message request */
- GSList *passkey_agents;
struct agent *agent; /* For the new API */
guint auth_idle_id; /* Ongoing authorization */
GSList *connections; /* Connected devices */
@@ -150,35 +142,18 @@
"Invalid arguments in method call");
}
-static inline DBusMessage *not_available(DBusMessage *msg)
-{
- return g_dbus_create_error(msg, ERROR_INTERFACE ".NotAvailable",
- "Not Available");
-}
-
static inline DBusMessage *adapter_not_ready(DBusMessage *msg)
{
return g_dbus_create_error(msg, ERROR_INTERFACE ".NotReady",
"Adapter is not ready");
}
-static inline DBusMessage *no_such_adapter(DBusMessage *msg)
-{
- return g_dbus_create_error(msg, ERROR_INTERFACE ".NoSuchAdapter",
- "No such adapter");
-}
-
static inline DBusMessage *failed_strerror(DBusMessage *msg, int err)
{
return g_dbus_create_error(msg, ERROR_INTERFACE ".Failed",
strerror(err));
}
-static inline DBusMessage *in_progress(DBusMessage *msg, const char *str)
-{
- return g_dbus_create_error(msg, ERROR_INTERFACE ".InProgress", str);
-}
-
static inline DBusMessage *not_in_progress(DBusMessage *msg, const char *str)
{
return g_dbus_create_error(msg, ERROR_INTERFACE ".NotInProgress", str);
@@ -190,13 +165,6 @@
"Not authorized");
}
-static inline DBusMessage *unsupported_major_class(DBusMessage *msg)
-{
- return g_dbus_create_error(msg,
- ERROR_INTERFACE ".UnsupportedMajorClass",
- "Unsupported Major Class");
-}
-
static int found_device_cmp(const struct remote_dev_info *d1,
const struct remote_dev_info *d2)
{
@@ -1478,9 +1446,7 @@
device = adapter_find_device(adapter, address);
if (!device || !device_is_creating(device, NULL))
- return g_dbus_create_error(msg,
- ERROR_INTERFACE ".NotInProgress",
- "Device creation not in progress");
+ return not_in_progress(msg, "Device creation not in progress");
if (!device_is_creating(device, sender))
return not_authorized(msg);
@@ -1906,10 +1872,6 @@
struct btd_adapter *adapter = user_data;
GSList *uuids = bt_string2list(value);
struct btd_device *device;
- bdaddr_t dst;
- char srcaddr[18], dstaddr[18];
-
- ba2str(&adapter->bdaddr, srcaddr);
if (g_slist_find_custom(adapter->devices,
key, (GCompareFunc) device_address_cmp))
@@ -1922,9 +1884,6 @@
device_set_temporary(device, FALSE);
adapter->devices = g_slist_append(adapter->devices, device);
- device_get_address(device, &dst);
- ba2str(&dst, dstaddr);
-
device_probe_drivers(device, uuids);
g_slist_foreach(uuids, (GFunc) g_free, NULL);
@@ -2472,7 +2431,8 @@
device_remove(l->data, FALSE);
g_slist_free(adapter->devices);
- unload_drivers(adapter);
+ if (adapter->initialized)
+ unload_drivers(adapter);
/* Return adapter to down state if it was not up on init */
if (adapter->up && !adapter->already_up)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.56/src/device.c new/bluez-4.57/src/device.c
--- old/bluez-4.56/src/device.c 2009-10-10 06:17:28.000000000 +0200
+++ new/bluez-4.57/src/device.c 2009-10-31 08:18:09.000000000 +0100
@@ -937,10 +937,12 @@
adapter_get_address(device->adapter, &src);
ba2str(&device->bdaddr, addr);
+
if (device->paired)
device_remove_bonding(device);
delete_entry(&src, "profiles", addr);
delete_entry(&src, "trusts", addr);
+ delete_all_records(&src, &device->bdaddr);
}
void device_remove(struct btd_device *device, gboolean remove_stored)
@@ -1134,10 +1136,8 @@
next = list->next;
for (uuid = driver->uuids; *uuid; uuid++) {
- sdp_record_t *rec;
-
if (!g_slist_find_custom(uuids, *uuid,
- (GCompareFunc) strcasecmp))
+ (GCompareFunc) strcasecmp))
continue;
debug("UUID %s was removed from device %s",
@@ -1148,24 +1148,28 @@
driver_data);
g_free(driver_data);
- rec = find_record_in_list(records, *uuid);
- if (!rec)
- break;
+ break;
+ }
+ }
- delete_record(srcaddr, dstaddr, rec->handle);
+ for (list = uuids; list; list = list->next) {
+ sdp_record_t *rec;
- records = sdp_list_remove(records, rec);
- sdp_record_free(rec);
+ device->uuids = g_slist_remove(device->uuids, list->data);
+
+ rec = find_record_in_list(records, list->data);
+ if (!rec)
+ continue;
+
+ delete_record(srcaddr, dstaddr, rec->handle);
+
+ records = sdp_list_remove(records, rec);
+ sdp_record_free(rec);
- break;
- }
}
if (records)
sdp_list_free(records, (sdp_free_func_t) sdp_record_free);
-
- for (list = uuids; list; list = list->next)
- device->uuids = g_slist_remove(device->uuids, list->data);
}
static void services_changed(struct btd_device *device)
@@ -1313,11 +1317,6 @@
update_services(req, recs);
- if (!req->profiles_added && !req->profiles_removed) {
- debug("%s: No service update", device->path);
- goto proceed;
- }
-
if (device->tmp_records && req->records) {
sdp_list_free(device->tmp_records,
(sdp_free_func_t) sdp_record_free);
@@ -1325,6 +1324,11 @@
req->records = NULL;
}
+ if (!req->profiles_added && !req->profiles_removed) {
+ debug("%s: No service update", device->path);
+ goto proceed;
+ }
+
/* Probe matching drivers for services added */
if (req->profiles_added)
device_probe_drivers(device, req->profiles_added);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.56/src/manager.c new/bluez-4.57/src/manager.c
--- old/bluez-4.56/src/manager.c 2009-08-16 20:43:34.000000000 +0200
+++ new/bluez-4.57/src/manager.c 2009-10-31 08:18:09.000000000 +0100
@@ -451,7 +451,7 @@
int manager_start_adapter(int id)
{
- struct btd_adapter* adapter;
+ struct btd_adapter *adapter;
int ret;
adapter = manager_find_adapter_by_id(id);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.56/src/storage.c new/bluez-4.57/src/storage.c
--- old/bluez-4.56/src/storage.c 2009-10-10 06:17:29.000000000 +0200
+++ new/bluez-4.57/src/storage.c 2009-10-31 08:18:09.000000000 +0100
@@ -913,7 +913,26 @@
rec_list->recs = sdp_list_append(rec_list->recs, rec);
}
-sdp_list_t *read_records(bdaddr_t *src, bdaddr_t *dst)
+void delete_all_records(const bdaddr_t *src, const bdaddr_t *dst)
+{
+ sdp_list_t *records, *seq;
+ char srcaddr[18], dstaddr[18];
+
+ ba2str(src, srcaddr);
+ ba2str(dst, dstaddr);
+
+ records = read_records(src, dst);
+
+ for (seq = records; seq; seq = seq->next) {
+ sdp_record_t *rec = seq->data;
+ delete_record(srcaddr, dstaddr, rec->handle);
+ }
+
+ if (records)
+ sdp_list_free(records, (sdp_free_func_t) sdp_record_free);
+}
+
+sdp_list_t *read_records(const bdaddr_t *src, const bdaddr_t *dst)
{
char filename[PATH_MAX + 1];
struct record_list rec_list;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bluez-4.56/src/storage.h new/bluez-4.57/src/storage.h
--- old/bluez-4.56/src/storage.h 2009-08-16 20:43:34.000000000 +0200
+++ new/bluez-4.57/src/storage.h 2009-10-31 08:18:09.000000000 +0100
@@ -63,7 +63,8 @@
sdp_record_t *record_from_string(const gchar *str);
sdp_record_t *fetch_record(const gchar *src, const gchar *dst, const uint32_t handle);
int delete_record(const gchar *src, const gchar *dst, const uint32_t handle);
-sdp_list_t *read_records(bdaddr_t *src, bdaddr_t *dst);
+void delete_all_records(const bdaddr_t *src, const bdaddr_t *dst);
+sdp_list_t *read_records(const bdaddr_t *src, const bdaddr_t *dst);
sdp_record_t *find_record_in_list(sdp_list_t *recs, const char *uuid);
int store_device_id(const gchar *src, const gchar *dst,
const uint16_t source, const uint16_t vendor,
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org