Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCHv2 BlueZ 2/2] configure.ac: call AC_SUBST(*_CFLAGS) and AC_SUBST(*_LIBS) only when needed
From: Antonio Ospite @ 2013-02-10 21:20 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Marcel Holtmann, Antonio Ospite
In-Reply-To: <1360531251-18371-1-git-send-email-ospite@studenti.unina.it>

Bring AC_SUBST(*_CFLAGS) and AC_SUBST(*_LIBS) in the same block of the
corresponding PKG_CHECK_MODULES() call.

Having these variables defined outside of the if tests is more than what
is needed as the corresponding PKG_CHECK_MODULES() might not have been
called at all there.

This is the same logic already used for USB_CFLAGS and USB_LIBS.
---
 configure.ac |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index b11dcf1..4ac8a78 100644
--- a/configure.ac
+++ b/configure.ac
@@ -140,12 +140,12 @@ AC_ARG_ENABLE(udev, AC_HELP_STRING([--disable-udev],
 if (test "${enable_tools}" != "no" && test "${enable_udev}" != "no"); then
 	PKG_CHECK_MODULES(UDEV, libudev >= 143, dummy=yes,
 				AC_MSG_ERROR(libudev >= 143 is required))
+	AC_SUBST(UDEV_CFLAGS)
+	AC_SUBST(UDEV_LIBS)
 	AC_CHECK_LIB(udev, udev_hwdb_new,
 		AC_DEFINE(HAVE_UDEV_HWDB_NEW, 1,
 			[Define to 1 if you have the udev_hwdb_new() function.]))
 fi
-AC_SUBST(UDEV_CFLAGS)
-AC_SUBST(UDEV_LIBS)
 AM_CONDITIONAL(UDEV, test "${enable_udev}" != "no")
 
 AC_ARG_WITH([udevdir], AC_HELP_STRING([--with-udevdir=DIR],
@@ -172,9 +172,9 @@ AC_ARG_ENABLE(obex, AC_HELP_STRING([--disable-obex],
 if (test "${enable_obex}" != "no"); then
 	PKG_CHECK_MODULES(ICAL, libical, dummy=yes,
 					AC_MSG_ERROR(libical is required))
+	AC_SUBST(ICAL_CFLAGS)
+	AC_SUBST(ICAL_LIBS)
 fi
-AC_SUBST(ICAL_CFLAGS)
-AC_SUBST(ICAL_LIBS)
 AM_CONDITIONAL(OBEX, test "${enable_obex}" != "no")
 
 AC_ARG_ENABLE(client, AC_HELP_STRING([--disable-client],
-- 
1.7.10.4

^ permalink raw reply related

* [PATCHv2 BlueZ 1/2] configure.ac: call AC_SUBST unconditionally with --with-* options
From: Antonio Ospite @ 2013-02-10 21:20 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Marcel Holtmann, Antonio Ospite
In-Reply-To: <1360531251-18371-1-git-send-email-ospite@studenti.unina.it>

Call AC_SUBST unconditionally when specifying --with-* options,
otherwise options like --with-dbusconfdir=DIR or --with-udevdir=DIR have
no effect.

Before this change, configuring with:

  $ mkdir build
  $ ./configure --disable-systemd \
                --prefix=$(pwd)/build \
                --with-dbusconfdir=$(pwd)/build/etc

resulted in the option value to be ignored at "make install" time, with
this error:

  /bin/mkdir: cannot create directory '/dbus-1/system.d': Permission denied

This is what was going on in configure.ac:

  # define the option
  AC_ARG_WITH([dbusconfdir] ... [path_dbusconfdir=${withval}])

  # when --with-dbusconfdir is NOT used
  if (test -z "${path_dbusconfdir}"); then
    ...

    # define the config dir automatically
    path_dbusconfdir="`$PKG_CONFIG --variable=sysconfdir dbus-1`"

    ...

    # set DBUS_CONFDIR
    AC_SUBST(DBUS_CONFDIR, [${path_dbusconfdir}])
  endif

when --with-dbusconfdir=SOMEDIR was used the test above failed, and the
result was that ${path_dbusconfdir} was indeed defined as manually
specified, but DBUS_CONFDIR was not, and the latter was going to be used
in Makefile.am:

  dbusdir = @DBUS_CONFDIR@/dbus-1/system.d

The failure in mkdir can be exposed by the use of the "--prefix" option
and by running "make install" as a normal user; when running "make
install" with the root user /dbus-1/system.d would be happily (and
wrongly) created.

By always setting variables relative to --with-* options (like
DBUS_CONFDIR) the cases when --with-someoption=SOMEDIR are used get
covered.
---
 configure.ac |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index 070acea..b11dcf1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -71,8 +71,8 @@ if (test -z "${path_dbusconfdir}"); then
 		AC_MSG_ERROR([D-Bus configuration directory is required])
 	fi
 	AC_MSG_RESULT([${path_dbusconfdir}])
-	AC_SUBST(DBUS_CONFDIR, [${path_dbusconfdir}])
 fi
+AC_SUBST(DBUS_CONFDIR, [${path_dbusconfdir}])
 
 AC_ARG_WITH([dbussystembusdir], AC_HELP_STRING([--with-dbussystembusdir=DIR],
 				[path to D-Bus system bus services directory]),
@@ -84,8 +84,8 @@ if (test -z "${path_dbussystembusdir}"); then
 		AC_MSG_ERROR([D-Bus system bus services directory is required])
 	fi
 	AC_MSG_RESULT([${path_dbussystembusdir}])
-	AC_SUBST(DBUS_SYSTEMBUSDIR, [${path_dbussystembusdir}])
 fi
+AC_SUBST(DBUS_SYSTEMBUSDIR, [${path_dbussystembusdir}])
 
 AC_ARG_WITH([dbussessionbusdir], AC_HELP_STRING([--with-dbussessionbusdir=DIR],
 				[path to D-Bus session bus services directory]),
@@ -97,8 +97,8 @@ if (test -z "${path_dbussessionbusdir}"); then
 		AC_MSG_ERROR([D-Bus session bus services directory is required])
 	fi
 	AC_MSG_RESULT([${path_dbussessionbusdir}])
-	AC_SUBST(DBUS_SESSIONBUSDIR, [${path_dbussessionbusdir}])
 fi
+AC_SUBST(DBUS_SESSIONBUSDIR, [${path_dbussessionbusdir}])
 
 AC_ARG_ENABLE(library, AC_HELP_STRING([--enable-library],
 		[install Bluetooth library]), [enable_library=${enableval}])
@@ -157,8 +157,8 @@ if (test "${enable_udev}" != "no" && test -z "${path_udevdir}"); then
 		AC_MSG_ERROR([udev directory is required])
 	fi
 	AC_MSG_RESULT([${path_udevdir}])
-	AC_SUBST(UDEV_DIR, [${path_udevdir}])
 fi
+AC_SUBST(UDEV_DIR, [${path_udevdir}])
 
 AM_CONDITIONAL(HID2HCI, test "${enable_tools}" != "no" &&
 		test "${enable_udev}" != "no" && test "${enable_usb}" != "no")
@@ -202,8 +202,8 @@ if (test "${enable_systemd}" != "no" && test -z "${path_systemunitdir}"); then
 		AC_MSG_ERROR([systemd system unit directory is required])
 	fi
 	AC_MSG_RESULT([${path_systemunitdir}])
-	AC_SUBST(SYSTEMD_SYSTEMUNITDIR, [${path_systemunitdir}])
 fi
+AC_SUBST(SYSTEMD_SYSTEMUNITDIR, [${path_systemunitdir}])
 
 AC_ARG_WITH([systemduserunitdir],
 			AC_HELP_STRING([--with-systemduserunitdir=DIR],
@@ -216,8 +216,8 @@ if (test "${enable_systemd}" != "no" && test -z "${path_userunitdir}"); then
 		AC_MSG_ERROR([systemd user unit directory is required])
 	fi
 	AC_MSG_RESULT([${path_userunitdir}])
-	AC_SUBST(SYSTEMD_USERUNITDIR, [${path_userunitdir}])
 fi
+AC_SUBST(SYSTEMD_USERUNITDIR, [${path_userunitdir}])
 
 AC_ARG_ENABLE(datafiles, AC_HELP_STRING([--disable-datafiles],
 			[do not install configuration and data files]),
-- 
1.7.10.4

^ permalink raw reply related

* [PATCHv2 BlueZ 0/2] configure.ac fixes
From: Antonio Ospite @ 2013-02-10 21:20 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Marcel Holtmann, Antonio Ospite
In-Reply-To: <1359906411-12624-1-git-send-email-ospite@studenti.unina.it>

Hi,

Patch 1 fixes --with-* options, it should be OK as Marcel
acknowledged.

Patch 2 is more for the sake of regularity with USB_CFLAGS and
USB_LIBS, it's not strictly necessary.

Thanks,
   Antonio

Antonio Ospite (2):
  configure.ac: call AC_SUBST unconditionally with --with-* options
  Call AC_SUBST(*_CFLAGS) and AC_SUBST(*_LIBS) only when needed

 configure.ac |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

-- 
Antonio Ospite
http://ao2.it

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?

^ permalink raw reply

* Re: [PATCH BlueZ] configure.ac: call AC_SUBST unconditionally
From: Antonio Ospite @ 2013-02-10 20:39 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth
In-Reply-To: <1360322491.20763.1.camel@aeonflux>

On Fri, 08 Feb 2013 13:21:31 +0200
Marcel Holtmann <marcel@holtmann.org> wrote:

> Hi Antonio,
> 
> > > > Call AC_SUBST unconditionally, otherwise options like
> > > > --with-dbusconfdir=DIR or --with-udevdir=DIR have no effect.
> > > > 
> > > > Before this change, configuring with:
> > > > 
> > > >   $ mkdir build
> > > >   $ ./configure --disable-systemd \
> > > >                 --prefix=$(pwd)/build \
> > > >                 --with-dbusconfdir=$(pwd)/build/etc
> > > > 
> > > > resulted in the option value to be ignored at "make install" time, with
> > > > this error:
> > > > 
> > > >   /bin/mkdir: cannot create directory '/dbus-1/system.d': Permission denied
> > > > 
> > > > After the patch the option value is respected.
> > > > ---
> > > > 
> > > > Hi,
> > > > 
> > > > the issue was highlighted by the use "--prefix=" and running "make install" as
> > > > a restricted user, maybe the are still other issues with this use case.
> > > > Anyone willing to take a deeper look?
> > > 
> > > why are you doing --prefix="" in the first place? I do not get that
> > > part.
> > 
> > Sorry, poor communication choice from my part, in the sentence above the
> > _whole_ --prefix= was enclosed in double quotes to mean "the --prefix
> > parameter", but I see this could be misleading, I am actually using:
> > 
> >   --prefix=$(pwd)/build
> > 
> > > > For instance, is "--prefix=DIR" supposed to be prepended to manually specified
> > > > paths too?
> > > >
> > > > Thanks,
> > > >    Antonio
> > > > 
> > > >  configure.ac |   16 ++++++++--------
> > > >  1 file changed, 8 insertions(+), 8 deletions(-)
> > > > 
> > > > diff --git a/configure.ac b/configure.ac
> > > > index 070acea..fe2893a 100644
> > > > --- a/configure.ac
> > > > +++ b/configure.ac
> > > > @@ -71,8 +71,8 @@ if (test -z "${path_dbusconfdir}"); then
> > > >  		AC_MSG_ERROR([D-Bus configuration directory is required])
> > > >  	fi
> > > >  	AC_MSG_RESULT([${path_dbusconfdir}])
> > > > -	AC_SUBST(DBUS_CONFDIR, [${path_dbusconfdir}])
> > > >  fi
> > > > +AC_SUBST(DBUS_CONFDIR, [${path_dbusconfdir}])
> > > 
> > > I am failing to see the bug here. you are providing the
> > > --with-dbusconfdir=DIR and thus is should work. What is causing the
> > > wrong mkdir actually.
> > >
> > 
> > This is what I understand is going on in configure.ac right now:
> > 
> >   # define the option
> >   AC_ARG_WITH([dbusconfdir] ... [path_dbusconfdir=${withval}])
> > 
> >   # when --with-dbusconfdir is NOT used
> >   if (test -z "${path_dbusconfdir}"); then
> >     ...
> > 
> >     # define the config dir
> >     path_dbusconfdir="`$PKG_CONFIG --variable=sysconfdir dbus-1`"
> >     
> >     ...
> >     
> >     # set DBUS_CONFDIR
> >     AC_SUBST(DBUS_CONFDIR, [${path_dbusconfdir}])
> >   endif
> > 
> > when --with-dbusconfdir=SOMEDIR is used the test above fails, and the
> > result is that ${path_dbusconfdir} is indeed defined, but DBUS_CONFDIR
> > is not, and the latter is going to be used in Makefile.am:
> > 
> >   dbusdir = @DBUS_CONFDIR@/dbus-1/system.d
> > 
> > The wrong makedir is exposed by my use of the "prefix" option and the
> > fact that I am running "make install" as a normal user, otherwise
> > /dbus-1/system.d would be happily (and wrongly) created.
> > 
> > By always setting DBUS_CONFDIR we cover the case when
> > --with-dbusconfdir=SOMEDIR is used.
> 
> I see your point here. This one is valid. Please send separate patches
> for that.

I will, thanks.

> > 
> > > >  AC_ARG_WITH([dbussystembusdir], AC_HELP_STRING([--with-dbussystembusdir=DIR],
> > > >  				[path to D-Bus system bus services directory]),
> > > > @@ -84,8 +84,8 @@ if (test -z "${path_dbussystembusdir}"); then
> > > >  		AC_MSG_ERROR([D-Bus system bus services directory is required])
> > > >  	fi
> > > >  	AC_MSG_RESULT([${path_dbussystembusdir}])
> > > > -	AC_SUBST(DBUS_SYSTEMBUSDIR, [${path_dbussystembusdir}])
> > > >  fi
> > > > +AC_SUBST(DBUS_SYSTEMBUSDIR, [${path_dbussystembusdir}])
> > > >  
> > > >  AC_ARG_WITH([dbussessionbusdir], AC_HELP_STRING([--with-dbussessionbusdir=DIR],
> > > >  				[path to D-Bus session bus services directory]),
> > > > @@ -97,8 +97,8 @@ if (test -z "${path_dbussessionbusdir}"); then
> > > >  		AC_MSG_ERROR([D-Bus session bus services directory is required])
> > > >  	fi
> > > >  	AC_MSG_RESULT([${path_dbussessionbusdir}])
> > > > -	AC_SUBST(DBUS_SESSIONBUSDIR, [${path_dbussessionbusdir}])
> > > >  fi
> > > > +AC_SUBST(DBUS_SESSIONBUSDIR, [${path_dbussessionbusdir}])
> > > >  
> > > >  AC_ARG_ENABLE(library, AC_HELP_STRING([--enable-library],
> > > >  		[install Bluetooth library]), [enable_library=${enableval}])
> > > > @@ -121,8 +121,6 @@ AC_ARG_ENABLE(usb, AC_HELP_STRING([--disable-usb],
> > > >  if (test "${enable_tools}" != "no" && test "${enable_usb}" != "no"  ); then
> > > >  	PKG_CHECK_MODULES(USB, libusb, dummy=yes,
> > > >  			AC_MSG_ERROR(USB library support is required))
> > > > -	AC_SUBST(USB_CFLAGS)
> > > > -	AC_SUBST(USB_LIBS)
> > > >  	AC_CHECK_LIB(usb, usb_get_busses, dummy=yes,
> > > >  		AC_DEFINE(NEED_USB_GET_BUSSES, 1,
> > > >  			[Define to 1 if you need the usb_get_busses() function.]
> > > > @@ -133,6 +131,8 @@ if (test "${enable_tools}" != "no" && test "${enable_usb}" != "no"  ); then
> > > >  on.]))
> > > >  	AC_DEFINE(HAVE_LIBUSB, 1, [Define to 1 if you have USB library.])
> > > >  fi
> > > > +AC_SUBST(USB_CFLAGS)
> > > > +AC_SUBST(USB_LIBS)
> > > 
> > > What are these changes for? I don't see any reason for them. And also
> > > they should not intermix in the patch. They need to explained
> > > separately.
> > > 
> > 
> > They are meant to follow the same logic used for
> > 
> > AC_SUBST(UDEV_CFLAGS)
> > AC_SUBST(UDEV_LIBS)
> > 
> > which are outside of the test.
> 
> I do not see this being valid. The logic does not work since it will
> abort if enabled.
> 

I double checked and I think that actually we can do the reverse that
this hunk was trying to do: bring inside the "if" tests other AC_SUBST
(*_CFLAGS) just like it is now done for USB_CFLAGS and USB_LIBS.

I'll try to explain that better in the commit message for the patch and
you'll decide whether to pick that up or not.

Regards,
   Antonio

-- 
Antonio Ospite
http://ao2.it

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?

^ permalink raw reply

* Missing manpage for main.conf
From: Rebecca Menessec @ 2013-02-09 22:22 UTC (permalink / raw)
  To: linux-bluetooth

I was looking for a way to disable BlueZ logging (Ubuntu machine), and
came across this, in the bluetoothd manpage:

'bluetoothd itself does not accept many command-line options, as most of
its configuration is done in the /etc/bluetooth/main.conf file, which
has its own man page.'

That doesn't appear to be true. I can't find any trace in any distro, or
in the source. I've found a bug filed here and there against the lack of
manpage, but no manpage.

There's definitely logging going on by default:

localhost ~ [0]# lsof -n 2> /dev/null | grep blue | grep log
rsyslogd   804          syslog    2w      REG               0,21    
2027       8482 /var/log/bluetoothd.log
rs:main    804  813     syslog    2w      REG               0,21    
2027       8482 /var/log/bluetoothd.log
rsyslogd   804  814     syslog    2w      REG               0,21    
2027       8482 /var/log/bluetoothd.log
rsyslogd   804  815     syslog    2w      REG               0,21    
2027       8482 /var/log/bluetoothd.log

Unfortunately, there's no hint anywhere what's causing bluetoothd to
log, or how to stop it.

^ permalink raw reply

* Re: bluez 5.2 build problem
From: Randy Yates @ 2013-02-09 10:31 UTC (permalink / raw)
  To: linux-bluetooth
In-Reply-To: <87d2w9zsnw.fsf@randy.site>

PS: The target kernel is a patched 3.7.4 from Robert Nelson's
distribution.

--Randy

Randy Yates <yates@digitalsignallabs.com> writes:

> After configuring with the attached config.log, I'm getting the
> following error during build:
>
>   CC     btio/bluetoothd-btio.o
> btio/btio.c: In function 'bt_io_get_type':
> btio/btio.c:109:35: error: 'SO_DOMAIN' undeclared (first use in this function)
> btio/btio.c:109:35: note: each undeclared identifier is reported only once for each function it appears in
> btio/btio.c:123:35: error: 'SO_PROTOCOL' undeclared (first use in this function)
> make[3]: *** [btio/bluetoothd-btio.o] Error 1
> make[2]: *** [all] Error 2
> make[2]: Leaving directory `/home/embedded-linux/tool/ti-sdk/bluez/bluez-5.2'
> make[1]: *** [make] Error 2
> make[1]: Leaving directory `/home/embedded-linux/tool/ti-sdk/bluez'
> make: *** [bluez] Error 2
>
> I checked the kernel/usr/include/sys/socket.h and it does not have
> SO_DOMAIN defined. I am using a fresh (cross-)build of glibc-2.17.
>
> Note that I am cross-compiling for the beagle-board xm using TI's Arago
> cross-compiler tools.
>
> Am I missing something obvious, or is this a build bug?

-- 
Randy Yates
Digital Signal Labs
http://www.digitalsignallabs.com

^ permalink raw reply

* bluez 5.2 build problem
From: Randy Yates @ 2013-02-09 10:29 UTC (permalink / raw)
  To: linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 1066 bytes --]

After configuring with the attached config.log, I'm getting the
following error during build:

  CC     btio/bluetoothd-btio.o
btio/btio.c: In function 'bt_io_get_type':
btio/btio.c:109:35: error: 'SO_DOMAIN' undeclared (first use in this function)
btio/btio.c:109:35: note: each undeclared identifier is reported only once for each function it appears in
btio/btio.c:123:35: error: 'SO_PROTOCOL' undeclared (first use in this function)
make[3]: *** [btio/bluetoothd-btio.o] Error 1
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/embedded-linux/tool/ti-sdk/bluez/bluez-5.2'
make[1]: *** [make] Error 2
make[1]: Leaving directory `/home/embedded-linux/tool/ti-sdk/bluez'
make: *** [bluez] Error 2

I checked the kernel/usr/include/sys/socket.h and it does not have
SO_DOMAIN defined. I am using a fresh (cross-)build of glibc-2.17.

Note that I am cross-compiling for the beagle-board xm using TI's Arago
cross-compiler tools.

Am I missing something obvious, or is this a build bug?
-- 
Randy Yates
Digital Signal Labs
http://www.digitalsignallabs.com

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: config.log --]
[-- Type: text/x-log, Size: 42775 bytes --]

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by bluez configure 5.2, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ ./configure --build=x86_64-suse-linux-gnu --host=arm-arago-linux-gnueabi --prefix=/home/embedded-linux/tool/ti-sdk/board-support/linux-nelson-patched-with-bluez-5.2/usr --sysconfdir=/home/embedded-linux/tool/ti-sdk/rootfs-partial/rootfs-partial/etc --with-sysroot=/home/embedded-linux/tool/ti-sdk/board-support/linux-nelson-patched-with-bluez-5.2 --localstatedir=/var --disable-cups --disable-usb --disable-udev --disable-systemd --disable-obex

## --------- ##
## Platform. ##
## --------- ##

hostname = randy
uname -m = x86_64
uname -r = 3.4.11-2.16-desktop
uname -s = Linux
uname -v = #1 SMP PREEMPT Wed Sep 26 17:05:00 UTC 2012 (259fc87)

/usr/bin/uname -p = x86_64
/bin/uname -X     = unknown

/bin/arch              = x86_64
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /home/embedded-linux/tool/ti-sdk/linux-devkit/bin
PATH: /home/yates/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/bin/X11
PATH: /usr/X11R6/bin
PATH: /usr/games
PATH: /usr/local/texlive/2011/bin/x86_64-linux


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2240: loading site script /usr/share/site/x86_64-unknown-linux-gnu
| #!/bin/sh
| # Site script for configure. It is resourced via $CONFIG_SITE environment varaible.
| 
| # If user did not specify libdir, guess the correct target:
| # Use lib64 for 64 bit bi-arch targets, keep the default for the rest.
| if test "$libdir" = '${exec_prefix}/lib' ; then
| 
| 	ac_config_site_64bit_host=NONE
| 
| 	case "$host" in
| 	"" )
| 		# User did not specify host target.
| 		# The native platform x86_64 is a bi-arch platform.
| 		# Try to detect cross-compilation to inferior architecture.
| 
| 		# We are trying to guess 32-bit target compilation. It's not as easy as
| 		# it sounds, as there is possible several intermediate combinations.
| 		ac_config_site_cross_to_32bit_host=NONE
| 
| 		# User defined -m32 in CFLAGS or CXXFLAGS:
| 		# (It's sufficient for 32-bit, but alone may cause mis-behavior of some checks.)
| 		case "$CFLAGS" in
| 		*-m32*)
| 			ac_config_site_cross_to_32bit_host=YES
| 			;;
| 		esac
| 		case "$CXXFLAGS" in
| 		*-m32*)
| 			ac_config_site_cross_to_32bit_host=YES
| 			;;
| 		esac
| 
| 		# Running with linux32:
| 		# (Changes detected platform, but not the toolchain target.)
| 		case "`/bin/uname -i`" in
| 		x86_64 | ppc64 | s390x )
| 			;;
| 		* )
| 			ac_config_site_cross_to_32bit_host=YES
| 			;;
| 		esac
| 
| 		if test "x$ac_config_site_cross_to_32bit_host" = xNONE; then
| 			ac_config_site_64bit_host=YES
| 		fi
| 
| 		;;
| 	*x86_64* | *ppc64* | *s390x* )
| 		ac_config_site_64bit_host=YES
| 		;;
| 	esac
| 
| 	if test "x$ac_config_site_64bit_host" = xYES; then
| 		libdir='${exec_prefix}/lib64'
| 	fi
| fi
| 
| # If user did not specify libexecdir, set the correct target:
| # Nor FHS nor openSUSE allow prefix/libexec. Let's default to prefix/lib.
| 
| if test "$libexecdir" = '${exec_prefix}/libexec' ; then
| 	libexecdir='${exec_prefix}/lib'
| fi
| 
| # Continue with the standard behavior of configure defined in AC_SITE_LOAD:
| if test "x$prefix" != xNONE; then
| 	ac_site_file1=$prefix/share/config.site
| 	ac_site_file2=$prefix/etc/config.site
| else
| 	ac_site_file1=$ac_default_prefix/share/config.site
| 	ac_site_file2=$ac_default_prefix/etc/config.site
| fi
| for ac_site_file in "$ac_site_file1" "$ac_site_file2"
| do
| 	test "x$ac_site_file" = xNONE && continue
| 	if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
| 		{ $as_echo "/usr/share/site/x86_64-unknown-linux-gnu:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
| $as_echo "/usr/share/site/x86_64-unknown-linux-gnu: loading site script $ac_site_file" >&6;}
| 		sed 's/^/| /' "$ac_site_file" >&5
| 		. "$ac_site_file" \
| 			|| { { $as_echo "/usr/share/site/x86_64-unknown-linux-gnu:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
| $as_echo "/usr/share/site/x86_64-unknown-linux-gnu: error: in \`$ac_pwd':" >&2;}
| as_fn_error $? "failed to load site script $ac_site_file
| See \`config.log' for more details" "$LINENO" 5; }
| 	fi
| done
configure:2382: checking for a BSD-compatible install
configure:2450: result: /usr/bin/install -c
configure:2461: checking whether build environment is sane
configure:2511: result: yes
configure:2560: checking for arm-arago-linux-gnueabi-strip
configure:2576: found /home/embedded-linux/tool/ti-sdk/linux-devkit/bin/arm-arago-linux-gnueabi-strip
configure:2587: result: arm-arago-linux-gnueabi-strip
configure:2652: checking for a thread-safe mkdir -p
configure:2691: result: /usr/bin/mkdir -p
configure:2704: checking for gawk
configure:2720: found /usr/bin/gawk
configure:2731: result: gawk
configure:2742: checking whether make sets $(MAKE)
configure:2764: result: yes
configure:2793: checking whether make supports nested variables
configure:2810: result: yes
configure:2878: checking how to create a pax tar archive
configure:2891: tar --version
tar (GNU tar) 1.26
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
configure:2894: $? = 0
configure:2934: tardir=conftest.dir && eval tar --format=posix -chf - "$tardir" >conftest.tar
configure:2937: $? = 0
configure:2941: tar -xf - <conftest.tar
configure:2944: $? = 0
configure:2957: result: gnutar
configure:2978: checking for style of include used by make
configure:3006: result: GNU
configure:3037: checking for arm-arago-linux-gnueabi-gcc
configure:3053: found /home/embedded-linux/tool/ti-sdk/linux-devkit/bin/arm-arago-linux-gnueabi-gcc
configure:3064: result: arm-arago-linux-gnueabi-gcc
configure:3333: checking for C compiler version
configure:3342: arm-arago-linux-gnueabi-gcc --version >&5
arm-arago-linux-gnueabi-gcc (GCC) 4.5.3 20110311 (prerelease)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3353: $? = 0
configure:3342: arm-arago-linux-gnueabi-gcc -v >&5
Using built-in specs.
COLLECT_GCC=arm-arago-linux-gnueabi-gcc
Target: arm-arago-linux-gnueabi
Configured with: /sim/scratch_a0850442/arago-tmp-arago/work/i686-armv7a-sdk-arago-linux-gnueabi/gcc-cross-sdk-4.5-r41.2+svnr170880/gcc-4_5-branch/configure --build=i686-linux --host=i686-linux --target=arm-arago-linux-gnueabi --prefix=/arago-2011.09/armv7a --exec_prefix=/arago-2011.09/armv7a --bindir=/arago-2011.09/armv7a/bin --sbindir=/arago-2011.09/armv7a/bin --libexecdir=/arago-2011.09/armv7a/libexec --datadir=/arago-2011.09/armv7a/share --sysconfdir=/arago-2011.09/armv7a/etc --sharedstatedir=/arago-2011.09/armv7a/share/com --localstatedir=/arago-2011.09/armv7a/var --libdir=/arago-2011.09/armv7a/lib --includedir=/arago-2011.09/armv7a/include --oldincludedir=/arago-2011.09/armv7a/include --infodir=/arago-2011.09/armv7a/share/info --mandir=/arago-2011.09/armv7a/share/man --enable-largefile --disable-nls --enable-ipv6 --with-gnu-ld --enable-shared --enable-languages=c,c++,objc,fortran --enable-threads=posix --disable-multilib --enable-c99 --enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch --program-prefix=arm-arago-linux-gnueabi- --enable-target-optspace --enable-lto --enable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap --with-float=softfp --with-sysroot=/arago-2011.09/armv7a/arm-arago-linux-gnueabi --with-build-time-tools=/sim/scratch_a0850442/arago-tmp-arago/sysroots/i686-linux/usr/armv7a/arm-arago-linux-gnueabi/bin --with-build-sysroot=/sim/scratch_a0850442/arago-tmp-arago/sysroots/armv7a-arago-linux-gnueabi --disable-libunwind-exceptions --with-mpfr=/sim/scratch_a0850442/arago-tmp-arago/sysroots/i686-linux/usr --with-system-zlib --enable-__cxa_atexit
Thread model: posix
gcc version 4.5.3 20110311 (prerelease) (GCC) 
configure:3353: $? = 0
configure:3342: arm-arago-linux-gnueabi-gcc -V >&5
arm-arago-linux-gnueabi-gcc: '-V' option must have argument
configure:3353: $? = 1
configure:3342: arm-arago-linux-gnueabi-gcc -qversion >&5
arm-arago-linux-gnueabi-gcc: unrecognized option '-qversion'
arm-arago-linux-gnueabi-gcc: no input files
configure:3353: $? = 1
configure:3373: checking whether the C compiler works
configure:3395: arm-arago-linux-gnueabi-gcc    conftest.c  >&5
configure:3399: $? = 0
configure:3447: result: yes
configure:3450: checking for C compiler default output file name
configure:3452: result: a.out
configure:3458: checking for suffix of executables
configure:3465: arm-arago-linux-gnueabi-gcc -o conftest    conftest.c  >&5
configure:3469: $? = 0
configure:3491: result: 
configure:3513: checking whether we are cross compiling
configure:3551: result: yes
configure:3556: checking for suffix of object files
configure:3578: arm-arago-linux-gnueabi-gcc -c   conftest.c >&5
configure:3582: $? = 0
configure:3603: result: o
configure:3607: checking whether we are using the GNU C compiler
configure:3626: arm-arago-linux-gnueabi-gcc -c   conftest.c >&5
configure:3626: $? = 0
configure:3635: result: yes
configure:3644: checking whether arm-arago-linux-gnueabi-gcc accepts -g
configure:3664: arm-arago-linux-gnueabi-gcc -c -g  conftest.c >&5
configure:3664: $? = 0
configure:3705: result: yes
configure:3722: checking for arm-arago-linux-gnueabi-gcc option to accept ISO C89
configure:3785: arm-arago-linux-gnueabi-gcc  -c -g -O2  conftest.c >&5
configure:3785: $? = 0
configure:3798: result: none needed
configure:3820: checking dependency style of arm-arago-linux-gnueabi-gcc
configure:3931: result: gcc3
configure:3952: checking how to run the C preprocessor
configure:3983: arm-arago-linux-gnueabi-gcc -E  conftest.c
configure:3983: $? = 0
configure:3997: arm-arago-linux-gnueabi-gcc -E  conftest.c
conftest.c:11:28: fatal error: ac_nonexistent.h: No such file or directory
compilation terminated.
configure:3997: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "bluez"
| #define PACKAGE_TARNAME "bluez"
| #define PACKAGE_VERSION "5.2"
| #define PACKAGE_STRING "bluez 5.2"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "bluez"
| #define VERSION "5.2"
| /* end confdefs.h.  */
| #include <ac_nonexistent.h>
configure:4022: result: arm-arago-linux-gnueabi-gcc -E
configure:4042: arm-arago-linux-gnueabi-gcc -E  conftest.c
configure:4042: $? = 0
configure:4056: arm-arago-linux-gnueabi-gcc -E  conftest.c
conftest.c:11:28: fatal error: ac_nonexistent.h: No such file or directory
compilation terminated.
configure:4056: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "bluez"
| #define PACKAGE_TARNAME "bluez"
| #define PACKAGE_VERSION "5.2"
| #define PACKAGE_STRING "bluez 5.2"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "bluez"
| #define VERSION "5.2"
| /* end confdefs.h.  */
| #include <ac_nonexistent.h>
configure:4085: checking for grep that handles long lines and -e
configure:4143: result: /usr/bin/grep
configure:4148: checking for egrep
configure:4210: result: /usr/bin/grep -E
configure:4215: checking for ANSI C header files
configure:4235: arm-arago-linux-gnueabi-gcc -c -g -O2  conftest.c >&5
configure:4235: $? = 0
configure:4319: result: yes
configure:4332: checking for sys/types.h
configure:4332: arm-arago-linux-gnueabi-gcc -c -g -O2  conftest.c >&5
configure:4332: $? = 0
configure:4332: result: yes
configure:4332: checking for sys/stat.h
configure:4332: arm-arago-linux-gnueabi-gcc -c -g -O2  conftest.c >&5
configure:4332: $? = 0
configure:4332: result: yes
configure:4332: checking for stdlib.h
configure:4332: arm-arago-linux-gnueabi-gcc -c -g -O2  conftest.c >&5
configure:4332: $? = 0
configure:4332: result: yes
configure:4332: checking for string.h
configure:4332: arm-arago-linux-gnueabi-gcc -c -g -O2  conftest.c >&5
configure:4332: $? = 0
configure:4332: result: yes
configure:4332: checking for memory.h
configure:4332: arm-arago-linux-gnueabi-gcc -c -g -O2  conftest.c >&5
configure:4332: $? = 0
configure:4332: result: yes
configure:4332: checking for strings.h
configure:4332: arm-arago-linux-gnueabi-gcc -c -g -O2  conftest.c >&5
configure:4332: $? = 0
configure:4332: result: yes
configure:4332: checking for inttypes.h
configure:4332: arm-arago-linux-gnueabi-gcc -c -g -O2  conftest.c >&5
configure:4332: $? = 0
configure:4332: result: yes
configure:4332: checking for stdint.h
configure:4332: arm-arago-linux-gnueabi-gcc -c -g -O2  conftest.c >&5
configure:4332: $? = 0
configure:4332: result: yes
configure:4332: checking for unistd.h
configure:4332: arm-arago-linux-gnueabi-gcc -c -g -O2  conftest.c >&5
configure:4332: $? = 0
configure:4332: result: yes
configure:4345: checking minix/config.h usability
configure:4345: arm-arago-linux-gnueabi-gcc -c -g -O2  conftest.c >&5
conftest.c:54:26: fatal error: minix/config.h: No such file or directory
compilation terminated.
configure:4345: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "bluez"
| #define PACKAGE_TARNAME "bluez"
| #define PACKAGE_VERSION "5.2"
| #define PACKAGE_STRING "bluez 5.2"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "bluez"
| #define VERSION "5.2"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| /* end confdefs.h.  */
| #include <stdio.h>
| #ifdef HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #ifdef HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #ifdef STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # ifdef HAVE_STDLIB_H
| #  include <stdlib.h>
| # endif
| #endif
| #ifdef HAVE_STRING_H
| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
| #  include <memory.h>
| # endif
| # include <string.h>
| #endif
| #ifdef HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #ifdef HAVE_INTTYPES_H
| # include <inttypes.h>
| #endif
| #ifdef HAVE_STDINT_H
| # include <stdint.h>
| #endif
| #ifdef HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| #include <minix/config.h>
configure:4345: result: no
configure:4345: checking minix/config.h presence
configure:4345: arm-arago-linux-gnueabi-gcc -E  conftest.c
conftest.c:21:26: fatal error: minix/config.h: No such file or directory
compilation terminated.
configure:4345: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "bluez"
| #define PACKAGE_TARNAME "bluez"
| #define PACKAGE_VERSION "5.2"
| #define PACKAGE_STRING "bluez 5.2"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "bluez"
| #define VERSION "5.2"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| /* end confdefs.h.  */
| #include <minix/config.h>
configure:4345: result: no
configure:4345: checking for minix/config.h
configure:4345: result: no
configure:4366: checking whether it is safe to define __EXTENSIONS__
configure:4384: arm-arago-linux-gnueabi-gcc -c -g -O2  conftest.c >&5
configure:4384: $? = 0
configure:4391: result: yes
configure:4417: checking whether make supports nested variables
configure:4434: result: yes
configure:4447: checking whether to enable maintainer-specific portions of Makefiles
configure:4456: result: no
configure:4483: checking for arm-arago-linux-gnueabi-pkg-config
configure:4516: result: no
configure:4526: checking for pkg-config
configure:4544: found /home/embedded-linux/tool/ti-sdk/linux-devkit/bin/pkg-config
configure:4556: result: /home/embedded-linux/tool/ti-sdk/linux-devkit/bin/pkg-config
configure:4568: WARNING: using cross tools not prefixed with host triplet
configure:4581: checking pkg-config is at least version 0.9.0
configure:4584: result: yes
configure:4617: checking for C/C++ restrict keyword
configure:4642: arm-arago-linux-gnueabi-gcc -c -g -O2  conftest.c >&5
configure:4642: $? = 0
configure:4650: result: __restrict
configure:4672: checking for arm-arago-linux-gnueabi-gcc
configure:4699: result: arm-arago-linux-gnueabi-gcc
configure:4968: checking for C compiler version
configure:4977: arm-arago-linux-gnueabi-gcc --version >&5
arm-arago-linux-gnueabi-gcc (GCC) 4.5.3 20110311 (prerelease)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:4988: $? = 0
configure:4977: arm-arago-linux-gnueabi-gcc -v >&5
Using built-in specs.
COLLECT_GCC=arm-arago-linux-gnueabi-gcc
Target: arm-arago-linux-gnueabi
Configured with: /sim/scratch_a0850442/arago-tmp-arago/work/i686-armv7a-sdk-arago-linux-gnueabi/gcc-cross-sdk-4.5-r41.2+svnr170880/gcc-4_5-branch/configure --build=i686-linux --host=i686-linux --target=arm-arago-linux-gnueabi --prefix=/arago-2011.09/armv7a --exec_prefix=/arago-2011.09/armv7a --bindir=/arago-2011.09/armv7a/bin --sbindir=/arago-2011.09/armv7a/bin --libexecdir=/arago-2011.09/armv7a/libexec --datadir=/arago-2011.09/armv7a/share --sysconfdir=/arago-2011.09/armv7a/etc --sharedstatedir=/arago-2011.09/armv7a/share/com --localstatedir=/arago-2011.09/armv7a/var --libdir=/arago-2011.09/armv7a/lib --includedir=/arago-2011.09/armv7a/include --oldincludedir=/arago-2011.09/armv7a/include --infodir=/arago-2011.09/armv7a/share/info --mandir=/arago-2011.09/armv7a/share/man --enable-largefile --disable-nls --enable-ipv6 --with-gnu-ld --enable-shared --enable-languages=c,c++,objc,fortran --enable-threads=posix --disable-multilib --enable-c99 --enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch --program-prefix=arm-arago-linux-gnueabi- --enable-target-optspace --enable-lto --enable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap --with-float=softfp --with-sysroot=/arago-2011.09/armv7a/arm-arago-linux-gnueabi --with-build-time-tools=/sim/scratch_a0850442/arago-tmp-arago/sysroots/i686-linux/usr/armv7a/arm-arago-linux-gnueabi/bin --with-build-sysroot=/sim/scratch_a0850442/arago-tmp-arago/sysroots/armv7a-arago-linux-gnueabi --disable-libunwind-exceptions --with-mpfr=/sim/scratch_a0850442/arago-tmp-arago/sysroots/i686-linux/usr --with-system-zlib --enable-__cxa_atexit
Thread model: posix
gcc version 4.5.3 20110311 (prerelease) (GCC) 
configure:4988: $? = 0
configure:4977: arm-arago-linux-gnueabi-gcc -V >&5
arm-arago-linux-gnueabi-gcc: '-V' option must have argument
configure:4988: $? = 1
configure:4977: arm-arago-linux-gnueabi-gcc -qversion >&5
arm-arago-linux-gnueabi-gcc: unrecognized option '-qversion'
arm-arago-linux-gnueabi-gcc: no input files
configure:4988: $? = 1
configure:4992: checking whether we are using the GNU C compiler
configure:5020: result: yes
configure:5029: checking whether arm-arago-linux-gnueabi-gcc accepts -g
configure:5090: result: yes
configure:5107: checking for arm-arago-linux-gnueabi-gcc option to accept ISO C89
configure:5183: result: none needed
configure:5205: checking dependency style of arm-arago-linux-gnueabi-gcc
configure:5316: result: gcc3
configure:5332: checking whether arm-arago-linux-gnueabi-gcc and cc understand -c and -o together
configure:5363: arm-arago-linux-gnueabi-gcc -c conftest.c -o conftest2.o >&5
configure:5367: $? = 0
configure:5373: arm-arago-linux-gnueabi-gcc -c conftest.c -o conftest2.o >&5
configure:5377: $? = 0
configure:5388: cc -c conftest.c >&5
configure:5392: $? = 0
configure:5400: cc -c conftest.c -o conftest2.o >&5
configure:5404: $? = 0
configure:5410: cc -c conftest.c -o conftest2.o >&5
configure:5414: $? = 0
configure:5432: result: yes
configure:5458: checking whether arm-arago-linux-gnueabi-gcc accepts -fPIE
configure:5473: result: yes
configure:5542: checking build system type
configure:5556: result: x86_64-suse-linux-gnu
configure:5576: checking host system type
configure:5589: result: arm-arago-linux-gnueabi
configure:5630: checking how to print strings
configure:5657: result: printf
configure:5678: checking for a sed that does not truncate output
configure:5742: result: /usr/bin/sed
configure:5760: checking for fgrep
configure:5822: result: /usr/bin/grep -F
configure:5857: checking for ld used by arm-arago-linux-gnueabi-gcc
configure:5924: result: /home/embedded-linux/tool/ti-sdk/linux-devkit/arm-arago-linux-gnueabi/bin/ld
configure:5931: checking if the linker (/home/embedded-linux/tool/ti-sdk/linux-devkit/arm-arago-linux-gnueabi/bin/ld) is GNU ld
configure:5946: result: yes
configure:5958: checking for BSD- or MS-compatible name lister (nm)
configure:6007: result: /home/embedded-linux/tool/ti-sdk/linux-devkit/bin/arm-arago-linux-gnueabi-nm -B
configure:6137: checking the name lister (/home/embedded-linux/tool/ti-sdk/linux-devkit/bin/arm-arago-linux-gnueabi-nm -B) interface
configure:6144: arm-arago-linux-gnueabi-gcc -c -g -O2  conftest.c >&5
configure:6147: /home/embedded-linux/tool/ti-sdk/linux-devkit/bin/arm-arago-linux-gnueabi-nm -B "conftest.o"
configure:6150: output
00000000 B some_variable
configure:6157: result: BSD nm
configure:6160: checking whether ln -s works
configure:6164: result: yes
configure:6172: checking the maximum length of command line arguments
configure:6302: result: 1635000
configure:6319: checking whether the shell understands some XSI constructs
configure:6329: result: yes
configure:6333: checking whether the shell understands "+="
configure:6339: result: yes
configure:6374: checking how to convert x86_64-suse-linux-gnu file names to arm-arago-linux-gnueabi format
configure:6414: result: func_convert_file_noop
configure:6421: checking how to convert x86_64-suse-linux-gnu file names to toolchain format
configure:6441: result: func_convert_file_noop
configure:6448: checking for /home/embedded-linux/tool/ti-sdk/linux-devkit/arm-arago-linux-gnueabi/bin/ld option to reload object files
configure:6455: result: -r
configure:6489: checking for arm-arago-linux-gnueabi-objdump
configure:6505: found /home/embedded-linux/tool/ti-sdk/linux-devkit/bin/arm-arago-linux-gnueabi-objdump
configure:6516: result: arm-arago-linux-gnueabi-objdump
configure:6588: checking how to recognize dependent libraries
configure:6786: result: pass_all
configure:6831: checking for arm-arago-linux-gnueabi-dlltool
configure:6861: result: no
configure:6871: checking for dlltool
configure:6901: result: no
configure:6931: checking how to associate runtime and link libraries
configure:6958: result: printf %s\n
configure:6974: checking for arm-arago-linux-gnueabi-ar
configure:6990: found /home/embedded-linux/tool/ti-sdk/linux-devkit/bin/arm-arago-linux-gnueabi-ar
configure:7001: result: arm-arago-linux-gnueabi-ar
configure:7082: checking for archiver @FILE support
configure:7099: arm-arago-linux-gnueabi-gcc -c -g -O2  conftest.c >&5
configure:7099: $? = 0
configure:7102: arm-arago-linux-gnueabi-ar cru libconftest.a @conftest.lst >&5
configure:7105: $? = 0
configure:7110: arm-arago-linux-gnueabi-ar cru libconftest.a @conftest.lst >&5
arm-arago-linux-gnueabi-ar: conftest.o: No such file or directory
configure:7113: $? = 1
configure:7125: result: @
configure:7143: checking for arm-arago-linux-gnueabi-strip
configure:7170: result: arm-arago-linux-gnueabi-strip
configure:7242: checking for arm-arago-linux-gnueabi-ranlib
configure:7258: found /home/embedded-linux/tool/ti-sdk/linux-devkit/bin/arm-arago-linux-gnueabi-ranlib
configure:7269: result: arm-arago-linux-gnueabi-ranlib
configure:7411: checking command to parse /home/embedded-linux/tool/ti-sdk/linux-devkit/bin/arm-arago-linux-gnueabi-nm -B output from arm-arago-linux-gnueabi-gcc object
configure:7531: arm-arago-linux-gnueabi-gcc -c -g -O2  conftest.c >&5
configure:7534: $? = 0
configure:7538: /home/embedded-linux/tool/ti-sdk/linux-devkit/bin/arm-arago-linux-gnueabi-nm -B conftest.o \| sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' \> conftest.nm
configure:7541: $? = 0
configure:7607: arm-arago-linux-gnueabi-gcc -o conftest -g -O2   conftest.c conftstm.o >&5
configure:7610: $? = 0
configure:7648: result: ok
configure:7685: checking for sysroot
configure:7715: result: /home/embedded-linux/tool/ti-sdk/board-support/linux-nelson-patched-with-bluez-5.2
configure:7931: checking for arm-arago-linux-gnueabi-mt
configure:7961: result: no
configure:7971: checking for mt
configure:7987: found /usr/bin/mt
configure:7998: result: mt
configure:8021: checking if mt is a manifest tool
configure:8027: mt '-?'
configure:8035: result: no
configure:8674: checking for dlfcn.h
configure:8674: arm-arago-linux-gnueabi-gcc -c -g -O2  conftest.c >&5
configure:8674: $? = 0
configure:8674: result: yes
configure:8850: checking for objdir
configure:8865: result: .libs
configure:9132: checking if arm-arago-linux-gnueabi-gcc supports -fno-rtti -fno-exceptions
configure:9150: arm-arago-linux-gnueabi-gcc -c -g -O2  -fno-rtti -fno-exceptions conftest.c >&5
cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
configure:9154: $? = 0
configure:9167: result: no
configure:9494: checking for arm-arago-linux-gnueabi-gcc option to produce PIC
configure:9501: result: -fPIC -DPIC
configure:9509: checking if arm-arago-linux-gnueabi-gcc PIC flag -fPIC -DPIC works
configure:9527: arm-arago-linux-gnueabi-gcc -c -g -O2  -fPIC -DPIC -DPIC conftest.c >&5
configure:9531: $? = 0
configure:9544: result: yes
configure:9573: checking if arm-arago-linux-gnueabi-gcc static flag -static works
configure:9601: result: yes
configure:9616: checking if arm-arago-linux-gnueabi-gcc supports -c -o file.o
configure:9637: arm-arago-linux-gnueabi-gcc -c -g -O2  -o out/conftest2.o conftest.c >&5
configure:9641: $? = 0
configure:9663: result: yes
configure:9671: checking if arm-arago-linux-gnueabi-gcc supports -c -o file.o
configure:9718: result: yes
configure:9751: checking whether the arm-arago-linux-gnueabi-gcc linker (/home/embedded-linux/tool/ti-sdk/linux-devkit/arm-arago-linux-gnueabi/bin/ld) supports shared libraries
configure:10908: result: yes
configure:10945: checking whether -lc should be explicitly linked in
configure:10953: arm-arago-linux-gnueabi-gcc -c -g -O2  conftest.c >&5
configure:10956: $? = 0
configure:10971: arm-arago-linux-gnueabi-gcc -shared  -fPIC -DPIC conftest.o  -v -Wl,-soname -Wl,conftest -o conftest 2\>\&1 \| /usr/bin/grep  -lc  \>/dev/null 2\>\&1
configure:10974: $? = 0
configure:10988: result: no
configure:11148: checking dynamic linker characteristics
configure:11648: arm-arago-linux-gnueabi-gcc -o conftest -g -O2   -Wl,-rpath -Wl,/foo conftest.c  >&5
configure:11648: $? = 0
configure:11882: result: GNU/Linux ld.so
configure:11989: checking how to hardcode library paths into programs
configure:12014: result: immediate
configure:12554: checking whether stripping libraries is possible
configure:12559: result: yes
configure:12594: checking if libtool supports shared libraries
configure:12596: result: yes
configure:12599: checking whether to build shared libraries
configure:12620: result: yes
configure:12623: checking whether to build static libraries
configure:12627: result: no
configure:12710: checking for signalfd
configure:12710: arm-arago-linux-gnueabi-gcc -o conftest -g -O2   conftest.c  >&5
configure:12710: $? = 0
configure:12710: result: yes
configure:12718: checking for dlopen in -ldl
configure:12743: arm-arago-linux-gnueabi-gcc -o conftest -g -O2   conftest.c -ldl   >&5
configure:12743: $? = 0
configure:12752: result: yes
configure:12763: checking for GLIB
configure:12770: $PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.28"
configure:12773: $? = 0
configure:12787: $PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.28"
configure:12790: $? = 0
configure:12828: result: yes
configure:12916: checking for DBUS
configure:12923: $PKG_CONFIG --exists --print-errors "dbus-1 >= 1.4"
configure:12926: $? = 0
configure:12940: $PKG_CONFIG --exists --print-errors "dbus-1 >= 1.4"
configure:12943: $? = 0
configure:12981: result: yes
configure:12995: checking D-Bus configuration directory
configure:13001: result: /home/embedded-linux/tool/ti-sdk/rootfs-partial/rootfs-partial/etc
configure:13014: checking D-Bus system bus services dir
configure:13020: result: /home/embedded-linux/tool/ti-sdk/board-support/linux-nelson-patched-with-bluez-5.2/usr/share/dbus-1/system-services
configure:13033: checking D-Bus session bus services dir
configure:13039: result: /home/embedded-linux/tool/ti-sdk/board-support/linux-nelson-patched-with-bluez-5.2/usr/share/dbus-1/services
configure:13561: checking readline/readline.h usability
configure:13561: arm-arago-linux-gnueabi-gcc -c -g -O2  conftest.c >&5
configure:13561: $? = 0
configure:13561: result: yes
configure:13561: checking readline/readline.h presence
configure:13561: arm-arago-linux-gnueabi-gcc -E  conftest.c
configure:13561: $? = 0
configure:13561: result: yes
configure:13561: checking for readline/readline.h
configure:13561: result: yes
configure:13890: creating ./config.status

## ---------------------- ##
## Running config.status. ##
## ---------------------- ##

This file was extended by bluez config.status 5.2, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  CONFIG_FILES    = 
  CONFIG_HEADERS  = 
  CONFIG_LINKS    = 
  CONFIG_COMMANDS = 
  $ ./config.status 

on randy

config.status:1148: creating Makefile
config.status:1148: creating src/bluetoothd.8
config.status:1148: creating lib/bluez.pc
config.status:1148: creating config.h
config.status:1377: executing depfiles commands
config.status:1377: executing libtool commands

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=x86_64-suse-linux-gnu
ac_cv_c_compiler_gnu=yes
ac_cv_c_restrict=__restrict
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_DBUS_CFLAGS_set=
ac_cv_env_DBUS_CFLAGS_value=
ac_cv_env_DBUS_LIBS_set=
ac_cv_env_DBUS_LIBS_value=
ac_cv_env_GLIB_CFLAGS_set=
ac_cv_env_GLIB_CFLAGS_value=
ac_cv_env_GLIB_LIBS_set=
ac_cv_env_GLIB_LIBS_value=
ac_cv_env_GTHREAD_CFLAGS_set=
ac_cv_env_GTHREAD_CFLAGS_value=
ac_cv_env_GTHREAD_LIBS_set=
ac_cv_env_GTHREAD_LIBS_value=
ac_cv_env_ICAL_CFLAGS_set=
ac_cv_env_ICAL_CFLAGS_value=
ac_cv_env_ICAL_LIBS_set=
ac_cv_env_ICAL_LIBS_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_PKG_CONFIG_LIBDIR_set=
ac_cv_env_PKG_CONFIG_LIBDIR_value=
ac_cv_env_PKG_CONFIG_PATH_set=set
ac_cv_env_PKG_CONFIG_PATH_value=/home/embedded-linux/tool/ti-sdk/board-support/linux-nelson-patched-with-bluez-5.2/usr/lib/pkgconfig
ac_cv_env_PKG_CONFIG_set=
ac_cv_env_PKG_CONFIG_value=
ac_cv_env_UDEV_CFLAGS_set=
ac_cv_env_UDEV_CFLAGS_value=
ac_cv_env_UDEV_LIBS_set=
ac_cv_env_UDEV_LIBS_value=
ac_cv_env_USB_CFLAGS_set=
ac_cv_env_USB_CFLAGS_value=
ac_cv_env_USB_LIBS_set=
ac_cv_env_USB_LIBS_value=
ac_cv_env_build_alias_set=set
ac_cv_env_build_alias_value=x86_64-suse-linux-gnu
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=arm-arago-linux-gnueabi
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_func_signalfd=yes
ac_cv_header_dlfcn_h=yes
ac_cv_header_inttypes_h=yes
ac_cv_header_memory_h=yes
ac_cv_header_minix_config_h=no
ac_cv_header_readline_readline_h=yes
ac_cv_header_stdc=yes
ac_cv_header_stdint_h=yes
ac_cv_header_stdlib_h=yes
ac_cv_header_string_h=yes
ac_cv_header_strings_h=yes
ac_cv_header_sys_stat_h=yes
ac_cv_header_sys_types_h=yes
ac_cv_header_unistd_h=yes
ac_cv_host=arm-arago-linux-gnueabi
ac_cv_lib_dl_dlopen=yes
ac_cv_objext=o
ac_cv_path_EGREP='/usr/bin/grep -E'
ac_cv_path_FGREP='/usr/bin/grep -F'
ac_cv_path_GREP=/usr/bin/grep
ac_cv_path_SED=/usr/bin/sed
ac_cv_path_ac_pt_PKG_CONFIG=/home/embedded-linux/tool/ti-sdk/linux-devkit/bin/pkg-config
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/usr/bin/mkdir
ac_cv_prog_AR=arm-arago-linux-gnueabi-ar
ac_cv_prog_AWK=gawk
ac_cv_prog_CC=arm-arago-linux-gnueabi-gcc
ac_cv_prog_CPP='arm-arago-linux-gnueabi-gcc -E'
ac_cv_prog_OBJDUMP=arm-arago-linux-gnueabi-objdump
ac_cv_prog_RANLIB=arm-arago-linux-gnueabi-ranlib
ac_cv_prog_STRIP=arm-arago-linux-gnueabi-strip
ac_cv_prog_ac_ct_MANIFEST_TOOL=mt
ac_cv_prog_cc_arm_arago_linux_gnueabi_gcc_c_o=yes
ac_cv_prog_cc_c89=
ac_cv_prog_cc_g=yes
ac_cv_prog_cc_pie=yes
ac_cv_prog_make_make_set=yes
ac_cv_safe_to_define___extensions__=yes
am_cv_CC_dependencies_compiler_type=gcc3
am_cv_make_support_nested_variables=yes
am_cv_prog_tar_pax=gnutar
lt_cv_ar_at_file=@
lt_cv_archive_cmds_need_lc=no
lt_cv_deplibs_check_method=pass_all
lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
lt_cv_ld_reload_flag=-r
lt_cv_nm_interface='BSD nm'
lt_cv_objdir=.libs
lt_cv_path_LD=/home/embedded-linux/tool/ti-sdk/linux-devkit/arm-arago-linux-gnueabi/bin/ld
lt_cv_path_NM='/home/embedded-linux/tool/ti-sdk/linux-devkit/bin/arm-arago-linux-gnueabi-nm -B'
lt_cv_path_mainfest_tool=no
lt_cv_prog_compiler_c_o=yes
lt_cv_prog_compiler_pic='-fPIC -DPIC'
lt_cv_prog_compiler_pic_works=yes
lt_cv_prog_compiler_rtti_exceptions=no
lt_cv_prog_compiler_static_works=yes
lt_cv_prog_gnu_ld=yes
lt_cv_sharedlib_from_linklib_cmd='printf %s\n'
lt_cv_shlibpath_overrides_runpath=no
lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[	 ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[	 ][	 ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p'\'' | sed '\''/ __gnu_lto/d'\'''
lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \([^ ]*\)[ ]*$/  {\"\1\", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/  {"\2", (void *) \&\2},/p'\'''
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='sed -n -e '\''s/^: \([^ ]*\)[ ]*$/  {\"\1\", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \(lib[^ ]*\)$/  {"\2", (void *) \&\2},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/  {"lib\2", (void *) \&\2},/p'\'''
lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[ABCDGIRSTW]* .* \(.*\)$/extern char \1;/p'\'''
lt_cv_sys_max_cmd_len=1635000
lt_cv_to_host_file_cmd=func_convert_file_noop
lt_cv_to_tool_file_cmd=func_convert_file_noop
pkg_cv_DBUS_CFLAGS='-I/home/embedded-linux/tool/ti-sdk/board-support/linux-nelson-patched-with-bluez-5.2/usr/include/dbus-1.0 -I/home/embedded-linux/tool/ti-sdk/board-support/linux-nelson-patched-with-bluez-5.2/usr/lib/dbus-1.0/include  '
pkg_cv_DBUS_LIBS='-L/home/embedded-linux/tool/ti-sdk/board-support/linux-nelson-patched-with-bluez-5.2/usr/lib -ldbus-1  '
pkg_cv_GLIB_CFLAGS='-I/home/embedded-linux/tool/ti-sdk/board-support/linux-nelson-patched-with-bluez-5.2/usr/include/glib-2.0 -I/home/embedded-linux/tool/ti-sdk/board-support/linux-nelson-patched-with-bluez-5.2/usr/lib/glib-2.0/include  '
pkg_cv_GLIB_LIBS='-L/home/embedded-linux/tool/ti-sdk/board-support/linux-nelson-patched-with-bluez-5.2/usr/lib -lglib-2.0  '

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='${SHELL} /home/embedded-linux/tool/ti-sdk/bluez/bluez-5.2/missing --run aclocal-1.11'
AMDEPBACKSLASH='\'
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='$${TAR-tar}'
AM_BACKSLASH='\'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
AM_DEFAULT_VERBOSITY='0'
AM_V='$(V)'
AR='arm-arago-linux-gnueabi-ar'
AUTOCONF='${SHELL} /home/embedded-linux/tool/ti-sdk/bluez/bluez-5.2/missing --run autoconf'
AUTOHEADER='${SHELL} /home/embedded-linux/tool/ti-sdk/bluez/bluez-5.2/missing --run autoheader'
AUTOMAKE='${SHELL} /home/embedded-linux/tool/ti-sdk/bluez/bluez-5.2/missing --run automake-1.11'
AWK='gawk'
CC='arm-arago-linux-gnueabi-gcc'
CCDEPMODE='depmode=gcc3'
CFLAGS='-g -O2'
CLIENT_FALSE='#'
CLIENT_TRUE=''
CPP='arm-arago-linux-gnueabi-gcc -E'
CPPFLAGS=''
CUPS_FALSE=''
CUPS_TRUE='#'
CYGPATH_W='echo'
DATAFILES_FALSE='#'
DATAFILES_TRUE=''
DBUS_CFLAGS='-I/home/embedded-linux/tool/ti-sdk/board-support/linux-nelson-patched-with-bluez-5.2/usr/include/dbus-1.0 -I/home/embedded-linux/tool/ti-sdk/board-support/linux-nelson-patched-with-bluez-5.2/usr/lib/dbus-1.0/include  '
DBUS_CONFDIR='/home/embedded-linux/tool/ti-sdk/rootfs-partial/rootfs-partial/etc'
DBUS_LIBS='-L/home/embedded-linux/tool/ti-sdk/board-support/linux-nelson-patched-with-bluez-5.2/usr/lib -ldbus-1  '
DBUS_SESSIONBUSDIR='/home/embedded-linux/tool/ti-sdk/board-support/linux-nelson-patched-with-bluez-5.2/usr/share/dbus-1/services'
DBUS_SYSTEMBUSDIR='/home/embedded-linux/tool/ti-sdk/board-support/linux-nelson-patched-with-bluez-5.2/usr/share/dbus-1/system-services'
DEFS='-DHAVE_CONFIG_H'
DEPDIR='.deps'
DLLTOOL='false'
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP='/usr/bin/grep -E'
EXEEXT=''
EXPERIMENTAL_FALSE=''
EXPERIMENTAL_TRUE='#'
FGREP='/usr/bin/grep -F'
GLIB_CFLAGS='-I/home/embedded-linux/tool/ti-sdk/board-support/linux-nelson-patched-with-bluez-5.2/usr/include/glib-2.0 -I/home/embedded-linux/tool/ti-sdk/board-support/linux-nelson-patched-with-bluez-5.2/usr/lib/glib-2.0/include  '
GLIB_LIBS='-L/home/embedded-linux/tool/ti-sdk/board-support/linux-nelson-patched-with-bluez-5.2/usr/lib -lglib-2.0  '
GREP='/usr/bin/grep'
GTHREAD_CFLAGS=''
GTHREAD_LIBS=''
HID2HCI_FALSE=''
HID2HCI_TRUE='#'
ICAL_CFLAGS=''
ICAL_LIBS=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LD='/home/embedded-linux/tool/ti-sdk/linux-devkit/arm-arago-linux-gnueabi/bin/ld'
LDFLAGS=''
LIBOBJS=''
LIBRARY_FALSE=''
LIBRARY_TRUE='#'
LIBS=''
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
LIPO=''
LN_S='ln -s'
LTLIBOBJS=''
MAINT='#'
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE='#'
MAKEINFO='${SHELL} /home/embedded-linux/tool/ti-sdk/bluez/bluez-5.2/missing --run makeinfo'
MANIFEST_TOOL=':'
MISC_CFLAGS=''
MISC_LDFLAGS=''
MKDIR_P='/usr/bin/mkdir -p'
MONITOR_FALSE='#'
MONITOR_TRUE=''
NM='/home/embedded-linux/tool/ti-sdk/linux-devkit/bin/arm-arago-linux-gnueabi-nm -B'
NMEDIT=''
OBEX_FALSE=''
OBEX_TRUE='#'
OBJDUMP='arm-arago-linux-gnueabi-objdump'
OBJEXT='o'
OTOOL64=''
OTOOL=''
PACKAGE='bluez'
PACKAGE_BUGREPORT=''
PACKAGE_NAME='bluez'
PACKAGE_STRING='bluez 5.2'
PACKAGE_TARNAME='bluez'
PACKAGE_URL=''
PACKAGE_VERSION='5.2'
PATH_SEPARATOR=':'
PKG_CONFIG='/home/embedded-linux/tool/ti-sdk/linux-devkit/bin/pkg-config'
PKG_CONFIG_LIBDIR=''
PKG_CONFIG_PATH='/home/embedded-linux/tool/ti-sdk/board-support/linux-nelson-patched-with-bluez-5.2/usr/lib/pkgconfig'
RANLIB='arm-arago-linux-gnueabi-ranlib'
READLINE_FALSE='#'
READLINE_TRUE=''
SED='/usr/bin/sed'
SET_MAKE=''
SHELL='/bin/sh'
STRIP='arm-arago-linux-gnueabi-strip'
SYSTEMD_FALSE=''
SYSTEMD_SYSTEMUNITDIR=''
SYSTEMD_TRUE='#'
SYSTEMD_USERUNITDIR=''
TEST_FALSE=''
TEST_TRUE='#'
TOOLS_FALSE='#'
TOOLS_TRUE=''
UDEV_CFLAGS=''
UDEV_DIR=''
UDEV_FALSE=''
UDEV_LIBS=''
UDEV_TRUE='#'
USB_CFLAGS=''
USB_FALSE=''
USB_LIBS=''
USB_TRUE='#'
VERSION='5.2'
WARNING_CFLAGS=''
ac_ct_AR=''
ac_ct_CC=''
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE='#'
am__fastdepCC_FALSE='#'
am__fastdepCC_TRUE=''
am__include='include'
am__isrc=''
am__leading_dot='.'
am__nodep='_no'
am__quote=''
am__tar='tar --format=posix -chf - "$$tardir"'
am__untar='tar -xf -'
bindir='${exec_prefix}/bin'
build='x86_64-suse-linux-gnu'
build_alias='x86_64-suse-linux-gnu'
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='suse'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='${prefix}'
host='arm-arago-linux-gnueabi'
host_alias='arm-arago-linux-gnueabi'
host_cpu='arm'
host_os='linux-gnueabi'
host_vendor='arago'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /home/embedded-linux/tool/ti-sdk/bluez/bluez-5.2/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/lib'
localedir='${datarootdir}/locale'
localstatedir='/var'
mandir='${datarootdir}/man'
mkdir_p='/usr/bin/mkdir -p'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/home/embedded-linux/tool/ti-sdk/board-support/linux-nelson-patched-with-bluez-5.2/usr'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='/home/embedded-linux/tool/ti-sdk/rootfs-partial/rootfs-partial/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "bluez"
#define PACKAGE_TARNAME "bluez"
#define PACKAGE_VERSION "5.2"
#define PACKAGE_STRING "bluez 5.2"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define PACKAGE "bluez"
#define VERSION "5.2"
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
#define __EXTENSIONS__ 1
#define _ALL_SOURCE 1
#define _GNU_SOURCE 1
#define _POSIX_PTHREAD_SEMANTICS 1
#define _TANDEM_SOURCE 1
#define restrict __restrict
#define HAVE_DLFCN_H 1
#define LT_OBJDIR ".libs/"
#define HAVE_READLINE_READLINE_H 1
#define STORAGEDIR "/var/lib/bluetooth"
#define CONFIGDIR "/home/embedded-linux/tool/ti-sdk/rootfs-partial/rootfs-partial/etc/bluetooth"

configure: exit 0

^ permalink raw reply

* [PATCH BlueZ] A2DP: Fix invalid write
From: Luiz Augusto von Dentz @ 2013-02-08 14:12 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Invalid write of size 8
   at 0x41F297: setconf_cfm (a2dp.c:567)
   by 0x42526B: session_cb (avdtp.c:3176)
   by 0x39B0847A54: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3400.2)
   by 0x39B0847D87: ??? (in /usr/lib64/libglib-2.0.so.0.3400.2)
   by 0x39B0848181: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3400.2)
   by 0x409C3E: main (main.c:583)
 Address 0x555fda8 is 40 bytes inside a block of size 88 free'd
   at 0x4A077A6: free (vg_replace_malloc.c:446)
   by 0x39B084D79E: g_free (in /usr/lib64/libglib-2.0.so.0.3400.2)
   by 0x41E217: setup_cb_free (a2dp.c:191)
   by 0x41E410: finalize_config (a2dp.c:234)
   by 0x41F296: setconf_cfm (a2dp.c:566)
   by 0x42526B: session_cb (avdtp.c:3176)
   by 0x39B0847A54: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3400.2)
   by 0x39B0847D87: ??? (in /usr/lib64/libglib-2.0.so.0.3400.2)
   by 0x39B0848181: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3400.2)
   by 0x409C3E: main (main.c:583)
---
 profiles/audio/a2dp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/profiles/audio/a2dp.c b/profiles/audio/a2dp.c
index 4b28465..f1646ee 100644
--- a/profiles/audio/a2dp.c
+++ b/profiles/audio/a2dp.c
@@ -562,9 +562,11 @@ static void setconf_cfm(struct avdtp *session, struct avdtp_local_sep *sep,
 
 	if (err) {
 		if (setup) {
+			setup_ref(setup);
 			setup->err = err;
 			finalize_config(setup);
 			setup->err = NULL;
+			setup_unref(setup);
 		}
 		return;
 	}
-- 
1.8.1


^ permalink raw reply related

* [PATCH] gdbus: Always unreference the message in g_dbus_send_message()
From: Tomasz Bursztyka @ 2013-02-08 13:58 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: luiz.dentz, Tomasz Bursztyka

---

Hi,

A quick fix on g_dbus_send_message(), if check_signal() fails it returns FALSE without unreferencing
the message as it should. This patch fixes it.

 gdbus/object.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gdbus/object.c b/gdbus/object.c
index 0c11246..ba8be94 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -1496,7 +1496,7 @@ DBusMessage *g_dbus_create_reply(DBusMessage *message, int type, ...)
 
 gboolean g_dbus_send_message(DBusConnection *connection, DBusMessage *message)
 {
-	dbus_bool_t result;
+	dbus_bool_t result = FALSE;
 
 	if (dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_METHOD_CALL)
 		dbus_message_set_no_reply(message, TRUE);
@@ -1507,11 +1507,12 @@ gboolean g_dbus_send_message(DBusConnection *connection, DBusMessage *message)
 		const GDBusArgInfo *args;
 
 		if (!check_signal(connection, path, interface, name, &args))
-			return FALSE;
+			goto out;
 	}
 
 	result = dbus_connection_send(connection, message, NULL);
 
+out:
 	dbus_message_unref(message);
 
 	return result;
-- 
1.8.1.2


^ permalink raw reply related

* Re: [PATCH BlueZ] configure.ac: call AC_SUBST unconditionally
From: Marcel Holtmann @ 2013-02-08 11:21 UTC (permalink / raw)
  To: Antonio Ospite; +Cc: linux-bluetooth
In-Reply-To: <20130207115044.ad0c33fb97da1d5ab1f1984e@studenti.unina.it>

Hi Antonio,

> > > Call AC_SUBST unconditionally, otherwise options like
> > > --with-dbusconfdir=DIR or --with-udevdir=DIR have no effect.
> > > 
> > > Before this change, configuring with:
> > > 
> > >   $ mkdir build
> > >   $ ./configure --disable-systemd \
> > >                 --prefix=$(pwd)/build \
> > >                 --with-dbusconfdir=$(pwd)/build/etc
> > > 
> > > resulted in the option value to be ignored at "make install" time, with
> > > this error:
> > > 
> > >   /bin/mkdir: cannot create directory '/dbus-1/system.d': Permission denied
> > > 
> > > After the patch the option value is respected.
> > > ---
> > > 
> > > Hi,
> > > 
> > > the issue was highlighted by the use "--prefix=" and running "make install" as
> > > a restricted user, maybe the are still other issues with this use case.
> > > Anyone willing to take a deeper look?
> > 
> > why are you doing --prefix="" in the first place? I do not get that
> > part.
> 
> Sorry, poor communication choice from my part, in the sentence above the
> _whole_ --prefix= was enclosed in double quotes to mean "the --prefix
> parameter", but I see this could be misleading, I am actually using:
> 
>   --prefix=$(pwd)/build
> 
> > > For instance, is "--prefix=DIR" supposed to be prepended to manually specified
> > > paths too?
> > >
> > > Thanks,
> > >    Antonio
> > > 
> > >  configure.ac |   16 ++++++++--------
> > >  1 file changed, 8 insertions(+), 8 deletions(-)
> > > 
> > > diff --git a/configure.ac b/configure.ac
> > > index 070acea..fe2893a 100644
> > > --- a/configure.ac
> > > +++ b/configure.ac
> > > @@ -71,8 +71,8 @@ if (test -z "${path_dbusconfdir}"); then
> > >  		AC_MSG_ERROR([D-Bus configuration directory is required])
> > >  	fi
> > >  	AC_MSG_RESULT([${path_dbusconfdir}])
> > > -	AC_SUBST(DBUS_CONFDIR, [${path_dbusconfdir}])
> > >  fi
> > > +AC_SUBST(DBUS_CONFDIR, [${path_dbusconfdir}])
> > 
> > I am failing to see the bug here. you are providing the
> > --with-dbusconfdir=DIR and thus is should work. What is causing the
> > wrong mkdir actually.
> >
> 
> This is what I understand is going on in configure.ac right now:
> 
>   # define the option
>   AC_ARG_WITH([dbusconfdir] ... [path_dbusconfdir=${withval}])
> 
>   # when --with-dbusconfdir is NOT used
>   if (test -z "${path_dbusconfdir}"); then
>     ...
> 
>     # define the config dir
>     path_dbusconfdir="`$PKG_CONFIG --variable=sysconfdir dbus-1`"
>     
>     ...
>     
>     # set DBUS_CONFDIR
>     AC_SUBST(DBUS_CONFDIR, [${path_dbusconfdir}])
>   endif
> 
> when --with-dbusconfdir=SOMEDIR is used the test above fails, and the
> result is that ${path_dbusconfdir} is indeed defined, but DBUS_CONFDIR
> is not, and the latter is going to be used in Makefile.am:
> 
>   dbusdir = @DBUS_CONFDIR@/dbus-1/system.d
> 
> The wrong makedir is exposed by my use of the "prefix" option and the
> fact that I am running "make install" as a normal user, otherwise
> /dbus-1/system.d would be happily (and wrongly) created.
> 
> By always setting DBUS_CONFDIR we cover the case when
> --with-dbusconfdir=SOMEDIR is used.

I see your point here. This one is valid. Please send separate patches
for that.

> 
> > >  AC_ARG_WITH([dbussystembusdir], AC_HELP_STRING([--with-dbussystembusdir=DIR],
> > >  				[path to D-Bus system bus services directory]),
> > > @@ -84,8 +84,8 @@ if (test -z "${path_dbussystembusdir}"); then
> > >  		AC_MSG_ERROR([D-Bus system bus services directory is required])
> > >  	fi
> > >  	AC_MSG_RESULT([${path_dbussystembusdir}])
> > > -	AC_SUBST(DBUS_SYSTEMBUSDIR, [${path_dbussystembusdir}])
> > >  fi
> > > +AC_SUBST(DBUS_SYSTEMBUSDIR, [${path_dbussystembusdir}])
> > >  
> > >  AC_ARG_WITH([dbussessionbusdir], AC_HELP_STRING([--with-dbussessionbusdir=DIR],
> > >  				[path to D-Bus session bus services directory]),
> > > @@ -97,8 +97,8 @@ if (test -z "${path_dbussessionbusdir}"); then
> > >  		AC_MSG_ERROR([D-Bus session bus services directory is required])
> > >  	fi
> > >  	AC_MSG_RESULT([${path_dbussessionbusdir}])
> > > -	AC_SUBST(DBUS_SESSIONBUSDIR, [${path_dbussessionbusdir}])
> > >  fi
> > > +AC_SUBST(DBUS_SESSIONBUSDIR, [${path_dbussessionbusdir}])
> > >  
> > >  AC_ARG_ENABLE(library, AC_HELP_STRING([--enable-library],
> > >  		[install Bluetooth library]), [enable_library=${enableval}])
> > > @@ -121,8 +121,6 @@ AC_ARG_ENABLE(usb, AC_HELP_STRING([--disable-usb],
> > >  if (test "${enable_tools}" != "no" && test "${enable_usb}" != "no"  ); then
> > >  	PKG_CHECK_MODULES(USB, libusb, dummy=yes,
> > >  			AC_MSG_ERROR(USB library support is required))
> > > -	AC_SUBST(USB_CFLAGS)
> > > -	AC_SUBST(USB_LIBS)
> > >  	AC_CHECK_LIB(usb, usb_get_busses, dummy=yes,
> > >  		AC_DEFINE(NEED_USB_GET_BUSSES, 1,
> > >  			[Define to 1 if you need the usb_get_busses() function.]
> > > @@ -133,6 +131,8 @@ if (test "${enable_tools}" != "no" && test "${enable_usb}" != "no"  ); then
> > >  on.]))
> > >  	AC_DEFINE(HAVE_LIBUSB, 1, [Define to 1 if you have USB library.])
> > >  fi
> > > +AC_SUBST(USB_CFLAGS)
> > > +AC_SUBST(USB_LIBS)
> > 
> > What are these changes for? I don't see any reason for them. And also
> > they should not intermix in the patch. They need to explained
> > separately.
> > 
> 
> They are meant to follow the same logic used for
> 
> AC_SUBST(UDEV_CFLAGS)
> AC_SUBST(UDEV_LIBS)
> 
> which are outside of the test.

I do not see this being valid. The logic does not work since it will
abort if enabled.

Regards

Marcel



^ permalink raw reply

* [PATCH] adapter: Fix registering adapter with no address
From: Szymon Janc @ 2013-02-08 10:03 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Szymon Janc

adapter->bdaddr is set later in read_info_complete and current check
always returns false. Check against bdaddr received in command response
instead and fail if it is all zeros.
---
 src/adapter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/adapter.c b/src/adapter.c
index 9ddd2fc..5165bed 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -5727,7 +5727,7 @@ static void read_info_complete(uint8_t status, uint16_t length,
 		goto failed;
 	}
 
-	if (bacmp(&adapter->bdaddr, BDADDR_ANY)) {
+	if (bacmp(&rp->bdaddr, BDADDR_ANY) == 0) {
 		error("No Bluetooth address for index %u", adapter->dev_id);
 		goto failed;
 	}
-- 
1.8.1.1


^ permalink raw reply related

* [PATCH BlueZ] core: Fix calling profile .connect multiple times
From: Luiz Augusto von Dentz @ 2013-02-08  9:51 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Sometimes profiles may complete the connection in different order
than expected so the code has to check if it was actually the
current pending profile to proceed to the next.
---
 src/device.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/device.c b/src/device.c
index 49f8957..8ee7659 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1085,8 +1085,14 @@ static int connect_next(struct btd_device *dev)
 void device_profile_connected(struct btd_device *dev,
 					struct btd_profile *profile, int err)
 {
+	struct btd_profile *pending;
+
 	DBG("%s %s (%d)", profile->name, strerror(-err), -err);
 
+	if (dev->pending == NULL)
+		return;
+
+	pending = dev->pending->data;
 	dev->pending = g_slist_remove(dev->pending, profile);
 
 	if (!err)
@@ -1094,6 +1100,13 @@ void device_profile_connected(struct btd_device *dev,
 				g_slist_append(dev->connected_profiles,
 								profile);
 
+	/* Only continue connecting the next profile if it matches the first
+	 * pending, otherwise it will trigger another connect to the same
+	 * profile
+	 */
+	if (profile != pending)
+		return;
+
 	if (connect_next(dev) == 0)
 		return;
 
-- 
1.8.1


^ permalink raw reply related

* Re: [RFC 1/7] Bluetooth: Add new connection states
From: Andre Guedes @ 2013-02-08  1:33 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth
In-Reply-To: <1359766284.16887.2.camel@aeonflux>

Hi Marcel,

On Fri, Feb 1, 2013 at 9:51 PM, Marcel Holtmann <marcel@holtmann.org> wrote:
> Hi Andre,
>
>> This patch adds two new connection states which will be used by
>> hci_conn to establish LE connections.
>>
>> BT_SCAN state means the controller is scanning for LE devices. Once
>> the target device is found, the connection goes to BT_DEV_FOUND
>> state, and then to BT_CONNECT state.
>>
>> Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
>> ---
>>  include/net/bluetooth/bluetooth.h | 8 +++++++-
>>  1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
>> index 9531bee..add5721 100644
>> --- a/include/net/bluetooth/bluetooth.h
>> +++ b/include/net/bluetooth/bluetooth.h
>> @@ -126,7 +126,9 @@ enum {
>>       BT_CONNECT2,
>>       BT_CONFIG,
>>       BT_DISCONN,
>> -     BT_CLOSED
>> +     BT_CLOSED,
>> +     BT_SCAN,
>> +     BT_DEV_FOUND
>>  };
>
> I am actually against this. These states where originally socket states
> and not general states that we just pile on top of.
>
> You need to create separate state handling for LE connection handling. I
> am really not happy that we always try to shoe-horn this onto something
> else.

Ok, I'll create a separated state for LE connection handling.

Regards,

Andre

^ permalink raw reply

* Re: list_debug double add from bluetooth
From: Karl Relton @ 2013-02-07 20:52 UTC (permalink / raw)
  To: Dave Jones
  Cc: Marcel Holtmann, Gustavo Padovan, Johan Hedberg,
	Fedora Kernel Team, linux-bluetooth
In-Reply-To: <20130207173812.GA23062@redhat.com>

On Thu, 2013-02-07 at 12:38 -0500, Dave Jones wrote:
> We had a user report this against 3.7.  I don't see anything obvious that has been
> committed in 3.8rc that would address this..
> 
> 	Dave
> 
> 
> :WARNING: at lib/list_debug.c:36 __list_add+0x9c/0xd0()
> :Hardware name: Latitude E6430
> :list_add double add: new=ffff8801d2c341b8, prev=ffff8801d2c341b8, next=ffff88021581d480.
> :Modules linked in: hidp fuse ebtable_nat ebtables ipt_MASQUERADE iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_CHECKSUM iptable_mangle be2iscsi iscsi_boot_sysfs bnx2i bridge stp llc cnic uio cxgb4i cxgb4 cxgb3i cxgb3 mdio libcxgbi ib_iser lockd sunrpc rdma_cm ib_addr iw_cm ib_cm ib_sa ib_mad ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi rfcomm bnep ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables uvcvideo arc4 iwldvm videobuf2_vmalloc btusb videobuf2_memops videobuf2_core videodev media coretemp mac80211 snd_hda_codec_hdmi bluetooth snd_hda_codec_idt i2c_i801 dell_laptop ppdev dcdbas parport_pc parport iTCO_wdt iTCO_vendor_support snd_hda_intel iwlwifi snd_hda_codec snd_hwdep lpc_ich mei mfd_core cfg80211 rfkill microcode snd_seq snd_seq_device snd_pcm snd_page_alloc snd_timer snd dell_wmi sparse_keymap soundcore e1000e vhost_net tun macvtap macvlan kvm_intel kvm uinput crc32c_intel ghas
> :h_clmulni_intel sdhci_pci sdhci mmc_core wmi i915 video i2c_algo_bit drm_kms_helper drm i2c_core
> :Pid: 548, comm: kworker/u:2H Not tainted 3.7.3-101.fc17.x86_64 #1
> :Call Trace:
> : [<ffffffff8105e69f>] warn_slowpath_common+0x7f/0xc0
> : [<ffffffff8105e796>] warn_slowpath_fmt+0x46/0x50
> : [<ffffffff812f985c>] __list_add+0x9c/0xd0
> : [<ffffffff812e7277>] kobject_add_internal+0x77/0x260
> : [<ffffffff812efa41>] ? vsnprintf+0x461/0x600
> : [<ffffffff8109a0f0>] ? enqueue_entity+0xc0/0x440
> : [<ffffffff812e77c7>] kobject_add+0x67/0xc0
> : [<ffffffff8117f009>] ? kfree+0x49/0x170
> : [<ffffffff813cc619>] device_add+0x119/0x6e0
> : [<ffffffff813caf91>] ? dev_set_name+0x41/0x50
> : [<ffffffffa03c73bb>] hci_conn_add_sysfs+0x5b/0xe0 [bluetooth]
> : [<ffffffffa03b8d30>] hci_conn_complete_evt.isra.45+0xe0/0x3f0 [bluetooth]
> : [<ffffffffa03bc198>] hci_event_packet+0x16b8/0x2900 [bluetooth]
> : [<ffffffffa03c628f>] ? hci_send_to_sock+0xff/0x1e0 [bluetooth]
> : [<ffffffff81513b27>] ? __kfree_skb+0x47/0xa0
> : [<ffffffff81513bb6>] ? kfree_skb+0x36/0xa0
> : [<ffffffffa03c628f>] ? hci_send_to_sock+0xff/0x1e0 [bluetooth]
> : [<ffffffffa03ae258>] hci_rx_work+0x1e8/0x430 [bluetooth]
> : [<ffffffff8101358e>] ? __switch_to+0x13e/0x4a0
> : [<ffffffff8107a4a7>] process_one_work+0x147/0x490
> : [<ffffffffa03ae070>] ? hci_send_frame+0xc0/0xc0 [bluetooth]
> : [<ffffffff8107cd3e>] worker_thread+0x15e/0x450
> : [<ffffffff8107cbe0>] ? busy_worker_rebind_fn+0x110/0x110
> : [<ffffffff81081ca0>] kthread+0xc0/0xd0
> : [<ffffffff81010000>] ? ftrace_raw_event_xen_mmu_flush_tlb_others+0x50/0xe0
> : [<ffffffff81081be0>] ? kthread_create_on_node+0x120/0x120
> : [<ffffffff816396ec>] ret_from_fork+0x7c/0xb0
> : [<ffffffff81081be0>] ? kthread_create_on_node+0x120/0x120
> 
Dave

Do you know if this is happening for the user in resuming from a
suspend?

If so, I would not be surprised if it was related to the race conditions
in the code that I describe in aspect number 2) of my posting:
http://www.spinics.net/lists/linux-bluetooth/msg32674.html

On a resume, the hci_conn device in sysfs is removed and re-added (along
with the hci device, because the whole controller is reset as the system
resumes). Due to issues in the code described at length in
https://bugzilla.kernel.org/show_bug.cgi?id=52471

the hci_conn removal is being delayed, so it races with the re-add: the
re-add is trying to add the same device that should have already been
removed.

I've offered two patches, one for a problem on input devices (e.g.
bluetooth keyboard/mice), and the other for another related race
condition that affects the removal of the hci device.

Regards
Karl

^ permalink raw reply

* [PATCH BlueZ] gdbus: Fix missing PropertiesChanged signal
From: Vinicius Costa Gomes @ 2013-02-07 17:40 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Vinicius Costa Gomes

If D-Bus ObjectManager is not supported, InterfacesAdded signal
checking needs to be ignored otherwise PropertiesChanged signal
will never be sent.
---
 gdbus/object.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gdbus/object.c b/gdbus/object.c
index 0c11246..43fb1f0 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -1701,8 +1701,11 @@ void g_dbus_emit_property_changed(DBusConnection *connection,
 	if (iface == NULL)
 		return;
 
-	/* Don't emit property changed if interface is not yet published */
-	if (g_slist_find(data->added, iface))
+	/*
+	 * If ObjectManager is attached, don't emit property changed if
+	 * interface is not yet published
+	 */
+	if (root && g_slist_find(data->added, iface))
 		return;
 
 	property = find_property(iface->properties, name);
-- 
1.8.1.2


^ permalink raw reply related

* list_debug double add from bluetooth
From: Dave Jones @ 2013-02-07 17:38 UTC (permalink / raw)
  To: Marcel Holtmann
  Cc: Gustavo Padovan, Johan Hedberg, Fedora Kernel Team,
	linux-bluetooth

We had a user report this against 3.7.  I don't see anything obvious that has been
committed in 3.8rc that would address this..

	Dave


:WARNING: at lib/list_debug.c:36 __list_add+0x9c/0xd0()
:Hardware name: Latitude E6430
:list_add double add: new=ffff8801d2c341b8, prev=ffff8801d2c341b8, next=ffff88021581d480.
:Modules linked in: hidp fuse ebtable_nat ebtables ipt_MASQUERADE iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_CHECKSUM iptable_mangle be2iscsi iscsi_boot_sysfs bnx2i bridge stp llc cnic uio cxgb4i cxgb4 cxgb3i cxgb3 mdio libcxgbi ib_iser lockd sunrpc rdma_cm ib_addr iw_cm ib_cm ib_sa ib_mad ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi rfcomm bnep ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables uvcvideo arc4 iwldvm videobuf2_vmalloc btusb videobuf2_memops videobuf2_core videodev media coretemp mac80211 snd_hda_codec_hdmi bluetooth snd_hda_codec_idt i2c_i801 dell_laptop ppdev dcdbas parport_pc parport iTCO_wdt iTCO_vendor_support snd_hda_intel iwlwifi snd_hda_codec snd_hwdep lpc_ich mei mfd_core cfg80211 rfkill microcode snd_seq snd_seq_device snd_pcm snd_page_alloc snd_timer snd dell_wmi sparse_keymap soundcore e1000e vhost_net tun macvtap macvlan kvm_intel kvm uinput crc32c_intel ghas
:h_clmulni_intel sdhci_pci sdhci mmc_core wmi i915 video i2c_algo_bit drm_kms_helper drm i2c_core
:Pid: 548, comm: kworker/u:2H Not tainted 3.7.3-101.fc17.x86_64 #1
:Call Trace:
: [<ffffffff8105e69f>] warn_slowpath_common+0x7f/0xc0
: [<ffffffff8105e796>] warn_slowpath_fmt+0x46/0x50
: [<ffffffff812f985c>] __list_add+0x9c/0xd0
: [<ffffffff812e7277>] kobject_add_internal+0x77/0x260
: [<ffffffff812efa41>] ? vsnprintf+0x461/0x600
: [<ffffffff8109a0f0>] ? enqueue_entity+0xc0/0x440
: [<ffffffff812e77c7>] kobject_add+0x67/0xc0
: [<ffffffff8117f009>] ? kfree+0x49/0x170
: [<ffffffff813cc619>] device_add+0x119/0x6e0
: [<ffffffff813caf91>] ? dev_set_name+0x41/0x50
: [<ffffffffa03c73bb>] hci_conn_add_sysfs+0x5b/0xe0 [bluetooth]
: [<ffffffffa03b8d30>] hci_conn_complete_evt.isra.45+0xe0/0x3f0 [bluetooth]
: [<ffffffffa03bc198>] hci_event_packet+0x16b8/0x2900 [bluetooth]
: [<ffffffffa03c628f>] ? hci_send_to_sock+0xff/0x1e0 [bluetooth]
: [<ffffffff81513b27>] ? __kfree_skb+0x47/0xa0
: [<ffffffff81513bb6>] ? kfree_skb+0x36/0xa0
: [<ffffffffa03c628f>] ? hci_send_to_sock+0xff/0x1e0 [bluetooth]
: [<ffffffffa03ae258>] hci_rx_work+0x1e8/0x430 [bluetooth]
: [<ffffffff8101358e>] ? __switch_to+0x13e/0x4a0
: [<ffffffff8107a4a7>] process_one_work+0x147/0x490
: [<ffffffffa03ae070>] ? hci_send_frame+0xc0/0xc0 [bluetooth]
: [<ffffffff8107cd3e>] worker_thread+0x15e/0x450
: [<ffffffff8107cbe0>] ? busy_worker_rebind_fn+0x110/0x110
: [<ffffffff81081ca0>] kthread+0xc0/0xd0
: [<ffffffff81010000>] ? ftrace_raw_event_xen_mmu_flush_tlb_others+0x50/0xe0
: [<ffffffff81081be0>] ? kthread_create_on_node+0x120/0x120
: [<ffffffff816396ec>] ret_from_fork+0x7c/0xb0
: [<ffffffff81081be0>] ? kthread_create_on_node+0x120/0x120

^ permalink raw reply

* Re: [PATCH 1/1] obexd: Add PushMessage
From: Luiz Augusto von Dentz @ 2013-02-07 11:51 UTC (permalink / raw)
  To: Christian Fetzer; +Cc: linux-bluetooth@vger.kernel.org
In-Reply-To: <1359132287-9714-1-git-send-email-christian.fetzer@oss.bmw-carit.de>

Hi Christian,

On Fri, Jan 25, 2013 at 6:44 PM, Christian Fetzer
<christian.fetzer@oss.bmw-carit.de> wrote:
> From: Christian Fetzer <christian.fetzer@bmw-carit.de>
>
> Push message has been implemented similar to send file (OPP),
> the message to send (in bMessage format) is read from a file.
> ---
>  doc/obex-api.txt   |  22 ++++++++
>  obexd/client/map.c | 161 +++++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 183 insertions(+)
>
> diff --git a/doc/obex-api.txt b/doc/obex-api.txt
> index 6246933..759c4d8 100644
> --- a/doc/obex-api.txt
> +++ b/doc/obex-api.txt
> @@ -630,6 +630,28 @@ Methods            void SetFolder(string name)
>
>                         Possible errors: org.bluez.obex.Error.Failed
>
> +               object, dict
> +               PushMessage(string sourcefile, string folder, dict args)
> +
> +                       Transfer a message (in bMessage format) to the
> +                       remote device.
> +
> +                       The message is transferred either to the given folder,
> +                       or to the current folder if folder is omitted.
> +
> +                       Possible args: Transparent, Retry, Charset
> +
> +                       The returned path represents the newly created transfer,
> +                       which should be used to find out if the content has been
> +                       successfully transferred or if the operation fails.
> +
> +                       The properties of this transfer are also returned along
> +                       with the object path, to avoid a call to GetAll.
> +
> +                       Possible errors: org.bluez.obex.Error.InvalidArguments
> +                                        org.bluez.obex.Error.Failed
> +
> +
>  Filter:                uint16 Offset:
>
>                         Offset of the first item, default is 0
> diff --git a/obexd/client/map.c b/obexd/client/map.c
> index ea5681a..2b665ec 100644
> --- a/obexd/client/map.c
> +++ b/obexd/client/map.c
> @@ -52,6 +52,7 @@
>  #define DEFAULT_COUNT 1024
>  #define DEFAULT_OFFSET 0
>
> +#define CHARSET_NATIVE 0
>  #define CHARSET_UTF8 1
>
>  static const char * const filter_list[] = {
> @@ -1495,6 +1496,160 @@ fail:
>         return reply;
>  }
>
> +static DBusMessage *push_message(struct map_data *map,
> +                                                       DBusMessage *message,
> +                                                       const char *filename,
> +                                                       const char *folder,
> +                                                       GObexApparam *apparam)
> +{
> +       struct obc_transfer *transfer;
> +       GError *err = NULL;
> +       DBusMessage *reply;
> +
> +       transfer = obc_transfer_put("x-bt/message", folder, filename,
> +                                                               NULL, 0, &err);
> +       if (transfer == NULL) {
> +               g_obex_apparam_free(apparam);
> +               goto fail;
> +       }
> +
> +       obc_transfer_set_apparam(transfer, apparam);
> +
> +       if (!obc_session_queue(map->session, transfer, NULL, NULL, &err))
> +               goto fail;
> +
> +       return obc_transfer_create_dbus_reply(transfer, message);
> +
> +fail:
> +       reply = g_dbus_create_error(message, ERROR_INTERFACE ".Failed", "%s",
> +                                                               err->message);
> +       g_error_free(err);
> +       return reply;
> +}
> +
> +static GObexApparam *parse_transparent(GObexApparam *apparam,
> +                                                       DBusMessageIter *iter)
> +{
> +       dbus_bool_t transparent;
> +
> +       if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_BOOLEAN)
> +               return NULL;
> +
> +       dbus_message_iter_get_basic(iter, &transparent);
> +
> +       return g_obex_apparam_set_uint8(apparam, MAP_AP_TRANSPARENT,
> +                                               transparent ? TRUE : FALSE);
> +}
> +
> +static GObexApparam *parse_retry(GObexApparam *apparam, DBusMessageIter *iter)
> +{
> +       dbus_bool_t retry;
> +
> +       if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_BOOLEAN)
> +               return NULL;
> +
> +       dbus_message_iter_get_basic(iter, &retry);
> +
> +       return g_obex_apparam_set_uint8(apparam, MAP_AP_RETRY,
> +                                                       retry ? TRUE : FALSE);
> +}
> +
> +static GObexApparam *parse_charset(GObexApparam *apparam, DBusMessageIter *iter)
> +{
> +       guint8 charset = 0;
> +       const char *string;
> +
> +       if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_STRING)
> +               return NULL;
> +
> +       dbus_message_iter_get_basic(iter, &string);
> +
> +       if (strcasecmp(string, "native") == 0)
> +               charset = CHARSET_NATIVE;
> +       else if (strcasecmp(string, "utf8") == 0)
> +               charset = CHARSET_UTF8;
> +       else
> +               return NULL;
> +
> +       return g_obex_apparam_set_uint8(apparam, MAP_AP_CHARSET, charset);
> +}
> +
> +static GObexApparam *parse_push_options(GObexApparam *apparam,
> +                                                       DBusMessageIter *iter)
> +{
> +       DBusMessageIter array;
> +
> +       if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_ARRAY)
> +               return NULL;
> +
> +       dbus_message_iter_recurse(iter, &array);
> +
> +       while (dbus_message_iter_get_arg_type(&array) == DBUS_TYPE_DICT_ENTRY) {
> +               const char *key;
> +               DBusMessageIter value, entry;
> +
> +               dbus_message_iter_recurse(&array, &entry);
> +               dbus_message_iter_get_basic(&entry, &key);
> +
> +               dbus_message_iter_next(&entry);
> +               dbus_message_iter_recurse(&entry, &value);
> +
> +               if (strcasecmp(key, "Transparent") == 0) {
> +                       if (parse_transparent(apparam, &value) == NULL)
> +                               return NULL;
> +               } else if (strcasecmp(key, "Retry") == 0) {
> +                       if (parse_retry(apparam, &value) == NULL)
> +                               return NULL;
> +               } else if (strcasecmp(key, "Charset") == 0) {
> +                       if (parse_charset(apparam, &value) == NULL)
> +                               return NULL;
> +               }
> +
> +               dbus_message_iter_next(&array);
> +       }
> +
> +       return apparam;
> +}
> +
> +static DBusMessage *map_push_message(DBusConnection *connection,
> +                                       DBusMessage *message, void *user_data)
> +{
> +       struct map_data *map = user_data;
> +       char *filename;
> +       char *folder;
> +       GObexApparam *apparam;
> +       DBusMessageIter args;
> +
> +       dbus_message_iter_init(message, &args);
> +
> +       if (dbus_message_iter_get_arg_type(&args) != DBUS_TYPE_STRING)
> +               return g_dbus_create_error(message,
> +                               ERROR_INTERFACE ".InvalidArguments", NULL);
> +
> +       dbus_message_iter_get_basic(&args, &filename);
> +
> +       dbus_message_iter_next(&args);
> +
> +       if (dbus_message_iter_get_arg_type(&args) != DBUS_TYPE_STRING) {
> +               return g_dbus_create_error(message,
> +                               ERROR_INTERFACE ".InvalidArguments", NULL);
> +       }
> +
> +       dbus_message_iter_get_basic(&args, &folder);
> +
> +       dbus_message_iter_next(&args);
> +
> +       apparam = g_obex_apparam_set_uint8(NULL, MAP_AP_CHARSET, CHARSET_UTF8);
> +
> +       if (parse_push_options(apparam, &args) == NULL) {
> +               g_obex_apparam_free(apparam);
> +               return g_dbus_create_error(message,
> +                               ERROR_INTERFACE ".InvalidArguments", NULL);
> +       }
> +
> +       return push_message(map, message, filename, folder, apparam);
> +}
> +
>  static const GDBusMethodTable map_methods[] = {
>         { GDBUS_ASYNC_METHOD("SetFolder",
>                                 GDBUS_ARGS({ "name", "s" }), NULL,
> @@ -1515,6 +1670,12 @@ static const GDBusMethodTable map_methods[] = {
>                         NULL,
>                         NULL,
>                         map_update_inbox) },
> +       { GDBUS_ASYNC_METHOD("PushMessage",
> +                       GDBUS_ARGS({ "file", "s" }, { "folder", "s" },
> +                                               { "args", "a{sv}" }),
> +                       GDBUS_ARGS({ "transfer", "o" },
> +                                               { "properties", "a{sv}" }),
> +                       map_push_message) },
>         { }
>  };
>
> --
> 1.8.1

Pushed, thanks.

-- 
Luiz Augusto von Dentz

^ permalink raw reply

* Re: [PATCH BlueZ] configure.ac: call AC_SUBST unconditionally
From: Antonio Ospite @ 2013-02-07 10:50 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth
In-Reply-To: <1360226227.15783.12.camel@aeonflux>

On Thu, 07 Feb 2013 10:37:07 +0200
Marcel Holtmann <marcel@holtmann.org> wrote:

> Hi Antonio,
> 
> > Call AC_SUBST unconditionally, otherwise options like
> > --with-dbusconfdir=DIR or --with-udevdir=DIR have no effect.
> > 
> > Before this change, configuring with:
> > 
> >   $ mkdir build
> >   $ ./configure --disable-systemd \
> >                 --prefix=$(pwd)/build \
> >                 --with-dbusconfdir=$(pwd)/build/etc
> > 
> > resulted in the option value to be ignored at "make install" time, with
> > this error:
> > 
> >   /bin/mkdir: cannot create directory '/dbus-1/system.d': Permission denied
> > 
> > After the patch the option value is respected.
> > ---
> > 
> > Hi,
> > 
> > the issue was highlighted by the use "--prefix=" and running "make install" as
> > a restricted user, maybe the are still other issues with this use case.
> > Anyone willing to take a deeper look?
> 
> why are you doing --prefix="" in the first place? I do not get that
> part.

Sorry, poor communication choice from my part, in the sentence above the
_whole_ --prefix= was enclosed in double quotes to mean "the --prefix
parameter", but I see this could be misleading, I am actually using:

  --prefix=$(pwd)/build

> > For instance, is "--prefix=DIR" supposed to be prepended to manually specified
> > paths too?
> >
> > Thanks,
> >    Antonio
> > 
> >  configure.ac |   16 ++++++++--------
> >  1 file changed, 8 insertions(+), 8 deletions(-)
> > 
> > diff --git a/configure.ac b/configure.ac
> > index 070acea..fe2893a 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -71,8 +71,8 @@ if (test -z "${path_dbusconfdir}"); then
> >  		AC_MSG_ERROR([D-Bus configuration directory is required])
> >  	fi
> >  	AC_MSG_RESULT([${path_dbusconfdir}])
> > -	AC_SUBST(DBUS_CONFDIR, [${path_dbusconfdir}])
> >  fi
> > +AC_SUBST(DBUS_CONFDIR, [${path_dbusconfdir}])
> 
> I am failing to see the bug here. you are providing the
> --with-dbusconfdir=DIR and thus is should work. What is causing the
> wrong mkdir actually.
>

This is what I understand is going on in configure.ac right now:

  # define the option
  AC_ARG_WITH([dbusconfdir] ... [path_dbusconfdir=${withval}])

  # when --with-dbusconfdir is NOT used
  if (test -z "${path_dbusconfdir}"); then
    ...

    # define the config dir
    path_dbusconfdir="`$PKG_CONFIG --variable=sysconfdir dbus-1`"
    
    ...
    
    # set DBUS_CONFDIR
    AC_SUBST(DBUS_CONFDIR, [${path_dbusconfdir}])
  endif

when --with-dbusconfdir=SOMEDIR is used the test above fails, and the
result is that ${path_dbusconfdir} is indeed defined, but DBUS_CONFDIR
is not, and the latter is going to be used in Makefile.am:

  dbusdir = @DBUS_CONFDIR@/dbus-1/system.d

The wrong makedir is exposed by my use of the "prefix" option and the
fact that I am running "make install" as a normal user, otherwise
/dbus-1/system.d would be happily (and wrongly) created.

By always setting DBUS_CONFDIR we cover the case when
--with-dbusconfdir=SOMEDIR is used.

> >  AC_ARG_WITH([dbussystembusdir], AC_HELP_STRING([--with-dbussystembusdir=DIR],
> >  				[path to D-Bus system bus services directory]),
> > @@ -84,8 +84,8 @@ if (test -z "${path_dbussystembusdir}"); then
> >  		AC_MSG_ERROR([D-Bus system bus services directory is required])
> >  	fi
> >  	AC_MSG_RESULT([${path_dbussystembusdir}])
> > -	AC_SUBST(DBUS_SYSTEMBUSDIR, [${path_dbussystembusdir}])
> >  fi
> > +AC_SUBST(DBUS_SYSTEMBUSDIR, [${path_dbussystembusdir}])
> >  
> >  AC_ARG_WITH([dbussessionbusdir], AC_HELP_STRING([--with-dbussessionbusdir=DIR],
> >  				[path to D-Bus session bus services directory]),
> > @@ -97,8 +97,8 @@ if (test -z "${path_dbussessionbusdir}"); then
> >  		AC_MSG_ERROR([D-Bus session bus services directory is required])
> >  	fi
> >  	AC_MSG_RESULT([${path_dbussessionbusdir}])
> > -	AC_SUBST(DBUS_SESSIONBUSDIR, [${path_dbussessionbusdir}])
> >  fi
> > +AC_SUBST(DBUS_SESSIONBUSDIR, [${path_dbussessionbusdir}])
> >  
> >  AC_ARG_ENABLE(library, AC_HELP_STRING([--enable-library],
> >  		[install Bluetooth library]), [enable_library=${enableval}])
> > @@ -121,8 +121,6 @@ AC_ARG_ENABLE(usb, AC_HELP_STRING([--disable-usb],
> >  if (test "${enable_tools}" != "no" && test "${enable_usb}" != "no"  ); then
> >  	PKG_CHECK_MODULES(USB, libusb, dummy=yes,
> >  			AC_MSG_ERROR(USB library support is required))
> > -	AC_SUBST(USB_CFLAGS)
> > -	AC_SUBST(USB_LIBS)
> >  	AC_CHECK_LIB(usb, usb_get_busses, dummy=yes,
> >  		AC_DEFINE(NEED_USB_GET_BUSSES, 1,
> >  			[Define to 1 if you need the usb_get_busses() function.]
> > @@ -133,6 +131,8 @@ if (test "${enable_tools}" != "no" && test "${enable_usb}" != "no"  ); then
> >  on.]))
> >  	AC_DEFINE(HAVE_LIBUSB, 1, [Define to 1 if you have USB library.])
> >  fi
> > +AC_SUBST(USB_CFLAGS)
> > +AC_SUBST(USB_LIBS)
> 
> What are these changes for? I don't see any reason for them. And also
> they should not intermix in the patch. They need to explained
> separately.
> 

They are meant to follow the same logic used for

AC_SUBST(UDEV_CFLAGS)
AC_SUBST(UDEV_LIBS)

which are outside of the test.

Unrelated, right, sorry. Maybe I'll send another patch for them.

Thanks,
   Antonio

-- 
Antonio Ospite
http://ao2.it

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?

^ permalink raw reply

* Re: [RFC v1 2/7] audio: Split AVRCP into two btd_profile
From: Mikel Astiz @ 2013-02-07 10:43 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth@vger.kernel.org, Mikel Astiz
In-Reply-To: <CABBYNZK+ym1ChNG5j-Y-1P_T0qrdYbF=BheZSMHoC3BTdR1arA@mail.gmail.com>

Hi Luiz,

On Thu, Feb 7, 2013 at 10:43 AM, Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
> Hi Mikel,
>
> On Wed, Feb 6, 2013 at 11:16 AM, Mikel Astiz <mikel.astiz.oss@gmail.com> wrote:
>> From: Mikel Astiz <mikel.astiz@bmw-carit.de>
>>
>> Register a separate btd_profile for each role of AVRCP.
>> ---
>>  profiles/audio/avrcp.c   | 80 +++++++++++++++++++++++++++++++++++++-----------
>>  profiles/audio/avrcp.h   |  6 ++--
>>  profiles/audio/manager.c | 71 ++++++++++++++++++++++++++++++------------
>>  3 files changed, 118 insertions(+), 39 deletions(-)
>>
>> diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
>> index 277f9f3..fe6333b 100644
>> --- a/profiles/audio/avrcp.c
>> +++ b/profiles/audio/avrcp.c
>> @@ -2712,41 +2712,63 @@ static struct avrcp_server *avrcp_server_register(struct btd_adapter *adapter,
>>         return server;
>>  }
>>
>> -int avrcp_register(struct btd_adapter *adapter, GKeyFile *config)
>> +int avrcp_target_register(struct btd_adapter *adapter, GKeyFile *config)
>>  {
>>         sdp_record_t *record;
>>         struct avrcp_server *server;
>>
>> +       server = find_server(servers, adapter);
>> +       if (server != NULL)
>> +               goto done;
>> +
>>         server = avrcp_server_register(adapter, config);
>>         if (server == NULL)
>>                 return -EPROTONOSUPPORT;
>>
>> +done:
>>         record = avrcp_tg_record();
>>         if (!record) {
>>                 error("Unable to allocate new service record");
>> -               avrcp_unregister(adapter);
>> +               avrcp_target_unregister(adapter);
>>                 return -1;
>>         }
>>
>>         if (add_record_to_server(adapter_get_address(adapter), record) < 0) {
>>                 error("Unable to register AVRCP target service record");
>> -               avrcp_unregister(adapter);
>> +               avrcp_target_unregister(adapter);
>>                 sdp_record_free(record);
>>                 return -1;
>>         }
>>         server->tg_record_id = record->handle;
>>
>> +       return 0;
>> +}
>> +
>> +int avrcp_remote_register(struct btd_adapter *adapter, GKeyFile *config)
>> +{
>> +       sdp_record_t *record;
>> +       struct avrcp_server *server;
>> +
>> +       server = find_server(servers, adapter);
>> +       if (server != NULL)
>> +               goto done;
>> +
>> +       server = avrcp_server_register(adapter, config);
>> +       if (server == NULL)
>> +               return -EPROTONOSUPPORT;
>> +
>> +done:
>>         record = avrcp_ct_record();
>>         if (!record) {
>>                 error("Unable to allocate new service record");
>> -               avrcp_unregister(adapter);
>> +               avrcp_remote_unregister(adapter);
>>                 return -1;
>>         }
>>
>>         if (add_record_to_server(adapter_get_address(adapter), record) < 0) {
>>                 error("Unable to register AVRCP service record");
>>                 sdp_record_free(record);
>> -               avrcp_unregister(adapter);
>> +               avrcp_remote_unregister(adapter);
>>                 return -1;
>>         }
>>         server->ct_record_id = record->handle;
>> @@ -2754,25 +2776,13 @@ int avrcp_register(struct btd_adapter *adapter, GKeyFile *config)
>>         return 0;
>>  }
>>
>> -void avrcp_unregister(struct btd_adapter *adapter)
>> +static void avrcp_server_unregister(struct avrcp_server *server)
>>  {
>> -       struct avrcp_server *server;
>> -
>> -       server = find_server(servers, adapter);
>> -       if (!server)
>> -               return;
>> -
>>         g_slist_free_full(server->sessions, g_free);
>>         g_slist_free_full(server->players, player_destroy);
>>
>>         servers = g_slist_remove(servers, server);
>>
>> -       if (server->ct_record_id != 0)
>> -               remove_record_from_server(server->ct_record_id);
>> -
>> -       if (server->tg_record_id != 0)
>> -               remove_record_from_server(server->tg_record_id);
>> -
>>         avctp_unregister(server->adapter);
>>         btd_adapter_unref(server->adapter);
>>         g_free(server);
>> @@ -2786,6 +2796,40 @@ void avrcp_unregister(struct btd_adapter *adapter)
>>         }
>>  }
>>
>> +void avrcp_target_unregister(struct btd_adapter *adapter)
>> +{
>> +       struct avrcp_server *server;
>> +
>> +       server = find_server(servers, adapter);
>> +       if (!server)
>> +               return;
>> +
>> +       if (server->tg_record_id != 0) {
>> +               remove_record_from_server(server->tg_record_id);
>> +               server->tg_record_id = 0;
>> +       }
>> +
>> +       if (server->ct_record_id == 0)
>> +               avrcp_server_unregister(server);
>> +}
>> +
>> +void avrcp_remote_unregister(struct btd_adapter *adapter)
>> +{
>> +       struct avrcp_server *server;
>> +
>> +       server = find_server(servers, adapter);
>> +       if (!server)
>> +               return;
>> +
>> +       if (server->ct_record_id != 0) {
>> +               remove_record_from_server(server->ct_record_id);
>> +               server->ct_record_id = 0;
>> +       }
>> +
>> +       if (server->tg_record_id == 0)
>> +               avrcp_server_unregister(server);
>> +}
>> +
>>  struct avrcp_player *avrcp_register_player(struct btd_adapter *adapter,
>>                                                 struct avrcp_player_cb *cb,
>>                                                 void *user_data,
>> diff --git a/profiles/audio/avrcp.h b/profiles/audio/avrcp.h
>> index 3799da1..1f98090 100644
>> --- a/profiles/audio/avrcp.h
>> +++ b/profiles/audio/avrcp.h
>> @@ -93,8 +93,10 @@ struct avrcp_player_cb {
>>                                                         void *user_data);
>>  };
>>
>> -int avrcp_register(struct btd_adapter *adapter, GKeyFile *config);
>> -void avrcp_unregister(struct btd_adapter *adapter);
>> +int avrcp_target_register(struct btd_adapter *adapter, GKeyFile *config);
>> +void avrcp_target_unregister(struct btd_adapter *adapter);
>> +int avrcp_remote_register(struct btd_adapter *adapter, GKeyFile *config);
>> +void avrcp_remote_unregister(struct btd_adapter *adapter);
>>
>>  gboolean avrcp_connect(struct audio_device *dev);
>>  void avrcp_disconnect(struct audio_device *dev);
>> diff --git a/profiles/audio/manager.c b/profiles/audio/manager.c
>> index 934227e..3023249 100644
>> --- a/profiles/audio/manager.c
>> +++ b/profiles/audio/manager.c
>> @@ -229,7 +229,7 @@ static int a2dp_sink_disconnect(struct btd_device *dev,
>>         return sink_disconnect(audio_dev, FALSE);
>>  }
>>
>> -static int avrcp_control_connect(struct btd_device *dev,
>> +static int avrcp_target_connect(struct btd_device *dev,
>>                                                 struct btd_profile *profile)
>>  {
>>         const char *path = device_get_path(dev);
>> @@ -246,7 +246,7 @@ static int avrcp_control_connect(struct btd_device *dev,
>>         return control_connect(audio_dev);
>>  }
>>
>> -static int avrcp_control_disconnect(struct btd_device *dev,
>> +static int avrcp_target_disconnect(struct btd_device *dev,
>>                                                 struct btd_profile *profile)
>>  {
>>         const char *path = device_get_path(dev);
>> @@ -295,20 +295,36 @@ static void a2dp_sink_server_remove(struct btd_profile *p,
>>         a2dp_sink_unregister(adapter);
>>  }
>>
>> -static int avrcp_server_probe(struct btd_profile *p,
>> +static int avrcp_target_server_probe(struct btd_profile *p,
>>                                                 struct btd_adapter *adapter)
>>  {
>>         DBG("path %s", adapter_get_path(adapter));
>>
>> -       return avrcp_register(adapter, config);
>> +       return avrcp_target_register(adapter, config);
>>  }
>>
>> -static void avrcp_server_remove(struct btd_profile *p,
>> +static int avrcp_remote_server_probe(struct btd_profile *p,
>>                                                 struct btd_adapter *adapter)
>>  {
>>         DBG("path %s", adapter_get_path(adapter));
>>
>> -       return avrcp_unregister(adapter);
>> +       return avrcp_remote_register(adapter, config);
>> +}
>> +
>> +static void avrcp_target_server_remove(struct btd_profile *p,
>> +                                               struct btd_adapter *adapter)
>> +{
>> +       DBG("path %s", adapter_get_path(adapter));
>> +
>> +       avrcp_target_unregister(adapter);
>> +}
>> +
>> +static void avrcp_remote_server_remove(struct btd_profile *p,
>> +                                               struct btd_adapter *adapter)
>> +{
>> +       DBG("path %s", adapter_get_path(adapter));
>> +
>> +       avrcp_remote_unregister(adapter);
>>  }
>>
>>  static int media_server_probe(struct btd_adapter *adapter)
>> @@ -357,19 +373,30 @@ static struct btd_profile a2dp_sink_profile = {
>>         .adapter_remove = a2dp_sink_server_remove,
>>  };
>>
>> -static struct btd_profile avrcp_profile = {
>> -       .name           = "audio-avrcp",
>> +static struct btd_profile avrcp_target_profile = {
>> +       .name           = "audio-avrcp-target",
>>
>> -       .remote_uuids   = BTD_UUIDS(AVRCP_TARGET_UUID, AVRCP_REMOTE_UUID),
>> +       .remote_uuids   = BTD_UUIDS(AVRCP_TARGET_UUID),
>>         .device_probe   = avrcp_probe,
>>         .device_remove  = audio_remove,
>>
>>         .auto_connect   = true,
>> -       .connect        = avrcp_control_connect,
>> -       .disconnect     = avrcp_control_disconnect,
>> +       .connect        = avrcp_target_connect,
>> +       .disconnect     = avrcp_target_disconnect,
>> +
>> +       .adapter_probe  = avrcp_target_server_probe,
>> +       .adapter_remove = avrcp_target_server_remove,
>> +};
>> +
>> +static struct btd_profile avrcp_remote_profile = {
>> +       .name           = "audio-avrcp-control",
>>
>> -       .adapter_probe  = avrcp_server_probe,
>> -       .adapter_remove = avrcp_server_remove,
>> +       .remote_uuids   = BTD_UUIDS(AVRCP_REMOTE_UUID),
>> +       .device_probe   = avrcp_probe,
>> +       .device_remove  = audio_remove,
>> +
>> +       .adapter_probe  = avrcp_remote_server_probe,
>> +       .adapter_remove = avrcp_remote_server_remove,
>>  };
>
> You probably need a .connect callback above, even though normally
> there should be both target and control records we should be able to
> detect if AVCTP is already connecting just return -EALREADY or 0.

I agree with your point but the current codebase seems to return
-ENOTSUP in control_connect() for the remote role, so I see no point
in adding .connect callback before such a feature gets implemented.

I'm not deep into the AVRCP code but I guess it's not as simple as
getting rid of this role check in control_connect(), right?

Cheers,
Mikel

^ permalink raw reply

* Re: [RFC v1 2/7] audio: Split AVRCP into two btd_profile
From: Luiz Augusto von Dentz @ 2013-02-07  9:43 UTC (permalink / raw)
  To: Mikel Astiz; +Cc: linux-bluetooth@vger.kernel.org, Mikel Astiz
In-Reply-To: <1360142187-15347-3-git-send-email-mikel.astiz.oss@gmail.com>

Hi Mikel,

On Wed, Feb 6, 2013 at 11:16 AM, Mikel Astiz <mikel.astiz.oss@gmail.com> wrote:
> From: Mikel Astiz <mikel.astiz@bmw-carit.de>
>
> Register a separate btd_profile for each role of AVRCP.
> ---
>  profiles/audio/avrcp.c   | 80 +++++++++++++++++++++++++++++++++++++-----------
>  profiles/audio/avrcp.h   |  6 ++--
>  profiles/audio/manager.c | 71 ++++++++++++++++++++++++++++++------------
>  3 files changed, 118 insertions(+), 39 deletions(-)
>
> diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
> index 277f9f3..fe6333b 100644
> --- a/profiles/audio/avrcp.c
> +++ b/profiles/audio/avrcp.c
> @@ -2712,41 +2712,63 @@ static struct avrcp_server *avrcp_server_register(struct btd_adapter *adapter,
>         return server;
>  }
>
> -int avrcp_register(struct btd_adapter *adapter, GKeyFile *config)
> +int avrcp_target_register(struct btd_adapter *adapter, GKeyFile *config)
>  {
>         sdp_record_t *record;
>         struct avrcp_server *server;
>
> +       server = find_server(servers, adapter);
> +       if (server != NULL)
> +               goto done;
> +
>         server = avrcp_server_register(adapter, config);
>         if (server == NULL)
>                 return -EPROTONOSUPPORT;
>
> +done:
>         record = avrcp_tg_record();
>         if (!record) {
>                 error("Unable to allocate new service record");
> -               avrcp_unregister(adapter);
> +               avrcp_target_unregister(adapter);
>                 return -1;
>         }
>
>         if (add_record_to_server(adapter_get_address(adapter), record) < 0) {
>                 error("Unable to register AVRCP target service record");
> -               avrcp_unregister(adapter);
> +               avrcp_target_unregister(adapter);
>                 sdp_record_free(record);
>                 return -1;
>         }
>         server->tg_record_id = record->handle;
>
> +       return 0;
> +}
> +
> +int avrcp_remote_register(struct btd_adapter *adapter, GKeyFile *config)
> +{
> +       sdp_record_t *record;
> +       struct avrcp_server *server;
> +
> +       server = find_server(servers, adapter);
> +       if (server != NULL)
> +               goto done;
> +
> +       server = avrcp_server_register(adapter, config);
> +       if (server == NULL)
> +               return -EPROTONOSUPPORT;
> +
> +done:
>         record = avrcp_ct_record();
>         if (!record) {
>                 error("Unable to allocate new service record");
> -               avrcp_unregister(adapter);
> +               avrcp_remote_unregister(adapter);
>                 return -1;
>         }
>
>         if (add_record_to_server(adapter_get_address(adapter), record) < 0) {
>                 error("Unable to register AVRCP service record");
>                 sdp_record_free(record);
> -               avrcp_unregister(adapter);
> +               avrcp_remote_unregister(adapter);
>                 return -1;
>         }
>         server->ct_record_id = record->handle;
> @@ -2754,25 +2776,13 @@ int avrcp_register(struct btd_adapter *adapter, GKeyFile *config)
>         return 0;
>  }
>
> -void avrcp_unregister(struct btd_adapter *adapter)
> +static void avrcp_server_unregister(struct avrcp_server *server)
>  {
> -       struct avrcp_server *server;
> -
> -       server = find_server(servers, adapter);
> -       if (!server)
> -               return;
> -
>         g_slist_free_full(server->sessions, g_free);
>         g_slist_free_full(server->players, player_destroy);
>
>         servers = g_slist_remove(servers, server);
>
> -       if (server->ct_record_id != 0)
> -               remove_record_from_server(server->ct_record_id);
> -
> -       if (server->tg_record_id != 0)
> -               remove_record_from_server(server->tg_record_id);
> -
>         avctp_unregister(server->adapter);
>         btd_adapter_unref(server->adapter);
>         g_free(server);
> @@ -2786,6 +2796,40 @@ void avrcp_unregister(struct btd_adapter *adapter)
>         }
>  }
>
> +void avrcp_target_unregister(struct btd_adapter *adapter)
> +{
> +       struct avrcp_server *server;
> +
> +       server = find_server(servers, adapter);
> +       if (!server)
> +               return;
> +
> +       if (server->tg_record_id != 0) {
> +               remove_record_from_server(server->tg_record_id);
> +               server->tg_record_id = 0;
> +       }
> +
> +       if (server->ct_record_id == 0)
> +               avrcp_server_unregister(server);
> +}
> +
> +void avrcp_remote_unregister(struct btd_adapter *adapter)
> +{
> +       struct avrcp_server *server;
> +
> +       server = find_server(servers, adapter);
> +       if (!server)
> +               return;
> +
> +       if (server->ct_record_id != 0) {
> +               remove_record_from_server(server->ct_record_id);
> +               server->ct_record_id = 0;
> +       }
> +
> +       if (server->tg_record_id == 0)
> +               avrcp_server_unregister(server);
> +}
> +
>  struct avrcp_player *avrcp_register_player(struct btd_adapter *adapter,
>                                                 struct avrcp_player_cb *cb,
>                                                 void *user_data,
> diff --git a/profiles/audio/avrcp.h b/profiles/audio/avrcp.h
> index 3799da1..1f98090 100644
> --- a/profiles/audio/avrcp.h
> +++ b/profiles/audio/avrcp.h
> @@ -93,8 +93,10 @@ struct avrcp_player_cb {
>                                                         void *user_data);
>  };
>
> -int avrcp_register(struct btd_adapter *adapter, GKeyFile *config);
> -void avrcp_unregister(struct btd_adapter *adapter);
> +int avrcp_target_register(struct btd_adapter *adapter, GKeyFile *config);
> +void avrcp_target_unregister(struct btd_adapter *adapter);
> +int avrcp_remote_register(struct btd_adapter *adapter, GKeyFile *config);
> +void avrcp_remote_unregister(struct btd_adapter *adapter);
>
>  gboolean avrcp_connect(struct audio_device *dev);
>  void avrcp_disconnect(struct audio_device *dev);
> diff --git a/profiles/audio/manager.c b/profiles/audio/manager.c
> index 934227e..3023249 100644
> --- a/profiles/audio/manager.c
> +++ b/profiles/audio/manager.c
> @@ -229,7 +229,7 @@ static int a2dp_sink_disconnect(struct btd_device *dev,
>         return sink_disconnect(audio_dev, FALSE);
>  }
>
> -static int avrcp_control_connect(struct btd_device *dev,
> +static int avrcp_target_connect(struct btd_device *dev,
>                                                 struct btd_profile *profile)
>  {
>         const char *path = device_get_path(dev);
> @@ -246,7 +246,7 @@ static int avrcp_control_connect(struct btd_device *dev,
>         return control_connect(audio_dev);
>  }
>
> -static int avrcp_control_disconnect(struct btd_device *dev,
> +static int avrcp_target_disconnect(struct btd_device *dev,
>                                                 struct btd_profile *profile)
>  {
>         const char *path = device_get_path(dev);
> @@ -295,20 +295,36 @@ static void a2dp_sink_server_remove(struct btd_profile *p,
>         a2dp_sink_unregister(adapter);
>  }
>
> -static int avrcp_server_probe(struct btd_profile *p,
> +static int avrcp_target_server_probe(struct btd_profile *p,
>                                                 struct btd_adapter *adapter)
>  {
>         DBG("path %s", adapter_get_path(adapter));
>
> -       return avrcp_register(adapter, config);
> +       return avrcp_target_register(adapter, config);
>  }
>
> -static void avrcp_server_remove(struct btd_profile *p,
> +static int avrcp_remote_server_probe(struct btd_profile *p,
>                                                 struct btd_adapter *adapter)
>  {
>         DBG("path %s", adapter_get_path(adapter));
>
> -       return avrcp_unregister(adapter);
> +       return avrcp_remote_register(adapter, config);
> +}
> +
> +static void avrcp_target_server_remove(struct btd_profile *p,
> +                                               struct btd_adapter *adapter)
> +{
> +       DBG("path %s", adapter_get_path(adapter));
> +
> +       avrcp_target_unregister(adapter);
> +}
> +
> +static void avrcp_remote_server_remove(struct btd_profile *p,
> +                                               struct btd_adapter *adapter)
> +{
> +       DBG("path %s", adapter_get_path(adapter));
> +
> +       avrcp_remote_unregister(adapter);
>  }
>
>  static int media_server_probe(struct btd_adapter *adapter)
> @@ -357,19 +373,30 @@ static struct btd_profile a2dp_sink_profile = {
>         .adapter_remove = a2dp_sink_server_remove,
>  };
>
> -static struct btd_profile avrcp_profile = {
> -       .name           = "audio-avrcp",
> +static struct btd_profile avrcp_target_profile = {
> +       .name           = "audio-avrcp-target",
>
> -       .remote_uuids   = BTD_UUIDS(AVRCP_TARGET_UUID, AVRCP_REMOTE_UUID),
> +       .remote_uuids   = BTD_UUIDS(AVRCP_TARGET_UUID),
>         .device_probe   = avrcp_probe,
>         .device_remove  = audio_remove,
>
>         .auto_connect   = true,
> -       .connect        = avrcp_control_connect,
> -       .disconnect     = avrcp_control_disconnect,
> +       .connect        = avrcp_target_connect,
> +       .disconnect     = avrcp_target_disconnect,
> +
> +       .adapter_probe  = avrcp_target_server_probe,
> +       .adapter_remove = avrcp_target_server_remove,
> +};
> +
> +static struct btd_profile avrcp_remote_profile = {
> +       .name           = "audio-avrcp-control",
>
> -       .adapter_probe  = avrcp_server_probe,
> -       .adapter_remove = avrcp_server_remove,
> +       .remote_uuids   = BTD_UUIDS(AVRCP_REMOTE_UUID),
> +       .device_probe   = avrcp_probe,
> +       .device_remove  = audio_remove,
> +
> +       .adapter_probe  = avrcp_remote_server_probe,
> +       .adapter_remove = avrcp_remote_server_remove,
>  };

You probably need a .connect callback above, even though normally
there should be both target and control records we should be able to
detect if AVCTP is already connecting just return -EALREADY or 0.

^ permalink raw reply

* Re: [PATCH BlueZ] configure.ac: call AC_SUBST unconditionally
From: Marcel Holtmann @ 2013-02-07  8:37 UTC (permalink / raw)
  To: Antonio Ospite; +Cc: linux-bluetooth
In-Reply-To: <1359906411-12624-1-git-send-email-ospite@studenti.unina.it>

Hi Antonio,

> Call AC_SUBST unconditionally, otherwise options like
> --with-dbusconfdir=DIR or --with-udevdir=DIR have no effect.
> 
> Before this change, configuring with:
> 
>   $ mkdir build
>   $ ./configure --disable-systemd \
>                 --prefix=$(pwd)/build \
>                 --with-dbusconfdir=$(pwd)/build/etc
> 
> resulted in the option value to be ignored at "make install" time, with
> this error:
> 
>   /bin/mkdir: cannot create directory '/dbus-1/system.d': Permission denied
> 
> After the patch the option value is respected.
> ---
> 
> Hi,
> 
> the issue was highlighted by the use "--prefix=" and running "make install" as
> a restricted user, maybe the are still other issues with this use case.
> Anyone willing to take a deeper look?

why are you doing --prefix="" in the first place? I do not get that
part.

> For instance, is "--prefix=DIR" supposed to be prepended to manually specified
> paths too?
> 
> Thanks,
>    Antonio
> 
>  configure.ac |   16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 070acea..fe2893a 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -71,8 +71,8 @@ if (test -z "${path_dbusconfdir}"); then
>  		AC_MSG_ERROR([D-Bus configuration directory is required])
>  	fi
>  	AC_MSG_RESULT([${path_dbusconfdir}])
> -	AC_SUBST(DBUS_CONFDIR, [${path_dbusconfdir}])
>  fi
> +AC_SUBST(DBUS_CONFDIR, [${path_dbusconfdir}])

I am failing to see the bug here. you are providing the
--with-dbusconfdir=DIR and thus is should work. What is causing the
wrong mkdir actually.
 
>  AC_ARG_WITH([dbussystembusdir], AC_HELP_STRING([--with-dbussystembusdir=DIR],
>  				[path to D-Bus system bus services directory]),
> @@ -84,8 +84,8 @@ if (test -z "${path_dbussystembusdir}"); then
>  		AC_MSG_ERROR([D-Bus system bus services directory is required])
>  	fi
>  	AC_MSG_RESULT([${path_dbussystembusdir}])
> -	AC_SUBST(DBUS_SYSTEMBUSDIR, [${path_dbussystembusdir}])
>  fi
> +AC_SUBST(DBUS_SYSTEMBUSDIR, [${path_dbussystembusdir}])
>  
>  AC_ARG_WITH([dbussessionbusdir], AC_HELP_STRING([--with-dbussessionbusdir=DIR],
>  				[path to D-Bus session bus services directory]),
> @@ -97,8 +97,8 @@ if (test -z "${path_dbussessionbusdir}"); then
>  		AC_MSG_ERROR([D-Bus session bus services directory is required])
>  	fi
>  	AC_MSG_RESULT([${path_dbussessionbusdir}])
> -	AC_SUBST(DBUS_SESSIONBUSDIR, [${path_dbussessionbusdir}])
>  fi
> +AC_SUBST(DBUS_SESSIONBUSDIR, [${path_dbussessionbusdir}])
>  
>  AC_ARG_ENABLE(library, AC_HELP_STRING([--enable-library],
>  		[install Bluetooth library]), [enable_library=${enableval}])
> @@ -121,8 +121,6 @@ AC_ARG_ENABLE(usb, AC_HELP_STRING([--disable-usb],
>  if (test "${enable_tools}" != "no" && test "${enable_usb}" != "no"  ); then
>  	PKG_CHECK_MODULES(USB, libusb, dummy=yes,
>  			AC_MSG_ERROR(USB library support is required))
> -	AC_SUBST(USB_CFLAGS)
> -	AC_SUBST(USB_LIBS)
>  	AC_CHECK_LIB(usb, usb_get_busses, dummy=yes,
>  		AC_DEFINE(NEED_USB_GET_BUSSES, 1,
>  			[Define to 1 if you need the usb_get_busses() function.]
> @@ -133,6 +131,8 @@ if (test "${enable_tools}" != "no" && test "${enable_usb}" != "no"  ); then
>  on.]))
>  	AC_DEFINE(HAVE_LIBUSB, 1, [Define to 1 if you have USB library.])
>  fi
> +AC_SUBST(USB_CFLAGS)
> +AC_SUBST(USB_LIBS)

What are these changes for? I don't see any reason for them. And also
they should not intermix in the patch. They need to explained
separately.

Regards

Marcel



^ permalink raw reply

* Re: [PATCH 1/2] hostname: Fallback to static hostname if pretty hostname is not set
From: Marcel Holtmann @ 2013-02-07  8:31 UTC (permalink / raw)
  To: Szymon Janc; +Cc: linux-bluetooth
In-Reply-To: <3769291.6MmiuAcpF2@athlon>

Hi Syzmon,

> > I am also not convinced that we should bother with the static hostname
> > at all. I left this out on purpose. My thinking here was that if we do
> > not have a pretty hostname, then why bother with trying to make
> > something useful out of the hostname, it would be ugly or wrong anyway.
> 
> Maybe not that fancy as pretty hostname but at least know to user(e.g for
> some reason my Fedora doesn't have pretty hostname set and falling back to 
> static hostname makes adapter name somewhat reasonable).
> Also falling back to static hostname will allow hostname plugin to number
> adapters' names. Yet, maybe main.conf parsing should be fixed instead to 
> properly substitute %h/%d as stated in comment. Currently name is simply set 
> to string '%h-%d' in such case...

I actually want to get rid of main.conf for default installs. And you
might have seen this already. We do not install it anymore. The defaults
should work as good as possible. Goal is to actually create stateless
systems without requiring /etc.

Regards

Marcel



^ permalink raw reply

* [PATCH 14/14] neard: Add fallback to legacy register if register failed
From: Szymon Janc @ 2013-02-07  8:14 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Ravi kumar Veeramally, Szymon Janc
In-Reply-To: <1360224844-12280-1-git-send-email-szymon.janc@tieto.com>

This will allow to work with neard 0.9 which doesn't support handover
agent register with carrier type.
---
 plugins/neard.c | 37 ++++++++++++++++++++++++++++---------
 1 file changed, 28 insertions(+), 9 deletions(-)

diff --git a/plugins/neard.c b/plugins/neard.c
index 9a4a924..97bf225 100644
--- a/plugins/neard.c
+++ b/plugins/neard.c
@@ -96,30 +96,48 @@ static DBusMessage *error_reply(DBusMessage *msg, int error)
 	return g_dbus_create_error(msg, name , "%s", strerror(error));
 }
 
+static void register_agent(bool append_carrier);
+
 static void register_agent_cb(DBusPendingCall *call, void *user_data)
 {
 	DBusMessage *reply;
 	DBusError err;
+	static bool try_fallback = true;
 
 	reply = dbus_pending_call_steal_reply(call);
 
 	dbus_error_init(&err);
 	if (dbus_set_error_from_message(&err, reply)) {
-		error("neard manager replied with an error: %s, %s",
-						err.name, err.message);
+		if (g_str_equal(DBUS_ERROR_UNKNOWN_METHOD, err.name) &&
+				try_fallback) {
+			info("Register to neard failed, trying legacy way");
+
+			register_agent(false);
+			try_fallback = false;
+		} else {
+			error("neard manager replied with an error: %s, %s",
+							err.name, err.message);
+
+			g_dbus_unregister_interface(btd_get_dbus_connection(),
+						AGENT_PATH, AGENT_INTERFACE);
+			try_fallback = true;
+		}
+
 		dbus_error_free(&err);
 		dbus_message_unref(reply);
 
-		g_dbus_unregister_interface(btd_get_dbus_connection(),
-						AGENT_PATH, AGENT_INTERFACE);
 		return;
 	}
 
 	dbus_message_unref(reply);
 	neard_path = g_strdup(dbus_message_get_sender(reply));
+
+	try_fallback = true;
+
+	info("Registered as neard handover agent");
 }
 
-static void register_agent(void)
+static void register_agent(bool append_carrier)
 {
 	DBusMessage *message;
 	DBusPendingCall *call;
@@ -136,7 +154,8 @@ static void register_agent(void)
 	dbus_message_append_args(message, DBUS_TYPE_OBJECT_PATH, &path,
 							DBUS_TYPE_INVALID);
 
-	dbus_message_append_args(message, DBUS_TYPE_STRING, &carrier,
+	if (append_carrier)
+		dbus_message_append_args(message, DBUS_TYPE_STRING, &carrier,
 							DBUS_TYPE_INVALID);
 
 	if (!dbus_connection_send_with_reply(btd_get_dbus_connection(),
@@ -252,7 +271,7 @@ static void read_local_complete(struct btd_adapter *adapter,
 
 		if (agent_register_postpone) {
 			agent_register_postpone = false;
-			register_agent();
+			register_agent(true);
 		}
 
 		return;
@@ -284,7 +303,7 @@ static void bonding_complete(struct btd_adapter *adapter,
 
 		if (agent_register_postpone) {
 			agent_register_postpone = false;
-			register_agent();
+			register_agent(true);
 		}
 
 		return;
@@ -840,7 +859,7 @@ static void neard_appeared(DBusConnection *conn, void *user_data)
 	if (adapter && btd_adapter_check_oob_handler(adapter))
 		agent_register_postpone = true;
 	else
-		register_agent();
+		register_agent(true);
 }
 
 static void neard_vanished(DBusConnection *conn, void *user_data)
-- 
1.8.1.1


^ permalink raw reply related

* [PATCH 13/14] neard: Updated neard handover registration agent api calls.
From: Szymon Janc @ 2013-02-07  8:14 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Ravi kumar Veeramally
In-Reply-To: <1360224844-12280-1-git-send-email-szymon.janc@tieto.com>

From: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>

neard RegisterHandoverAgent and UnregisterHandoverAgent apis
need an extra parameter of carrier type(e.g. bluetooth).
---
 plugins/neard.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/plugins/neard.c b/plugins/neard.c
index ab51057..9a4a924 100644
--- a/plugins/neard.c
+++ b/plugins/neard.c
@@ -46,6 +46,7 @@
 #define NEARD_MANAGER_INTERFACE "org.neard.Manager"
 #define AGENT_INTERFACE "org.neard.HandoverAgent"
 #define AGENT_PATH "/org/bluez/neard_handover_agent"
+#define AGENT_CARRIER_TYPE "bluetooth"
 #define ERROR_INTERFACE "org.neard.HandoverAgent.Error"
 
 static guint watcher_id = 0;
@@ -123,6 +124,7 @@ static void register_agent(void)
 	DBusMessage *message;
 	DBusPendingCall *call;
 	const char *path = AGENT_PATH;
+	const char *carrier = AGENT_CARRIER_TYPE;
 
 	message = dbus_message_new_method_call(NEARD_NAME, NEARD_PATH,
 			NEARD_MANAGER_INTERFACE, "RegisterHandoverAgent");
@@ -134,6 +136,9 @@ static void register_agent(void)
 	dbus_message_append_args(message, DBUS_TYPE_OBJECT_PATH, &path,
 							DBUS_TYPE_INVALID);
 
+	dbus_message_append_args(message, DBUS_TYPE_STRING, &carrier,
+							DBUS_TYPE_INVALID);
+
 	if (!dbus_connection_send_with_reply(btd_get_dbus_connection(),
 							message, &call, -1)) {
 		dbus_message_unref(message);
@@ -151,6 +156,7 @@ static void unregister_agent(void)
 {
 	DBusMessage *message;
 	const char *path = AGENT_PATH;
+	const char *carrier = AGENT_CARRIER_TYPE;
 
 	g_free(neard_path);
 	neard_path = NULL;
@@ -166,6 +172,9 @@ static void unregister_agent(void)
 	dbus_message_append_args(message, DBUS_TYPE_OBJECT_PATH, &path,
 						DBUS_TYPE_INVALID);
 
+	dbus_message_append_args(message, DBUS_TYPE_STRING, &carrier,
+							DBUS_TYPE_INVALID);
+
 	if (!g_dbus_send_message(btd_get_dbus_connection(), message))
 		error("D-Bus send failed");
 
-- 
1.8.1.1


^ permalink raw reply related

* [PATCH 12/14] neard: Update copyright information
From: Szymon Janc @ 2013-02-07  8:14 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Ravi kumar Veeramally, Szymon Janc
In-Reply-To: <1360224844-12280-1-git-send-email-szymon.janc@tieto.com>

---
 plugins/neard.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/neard.c b/plugins/neard.c
index b3ba2b0..ab51057 100644
--- a/plugins/neard.c
+++ b/plugins/neard.c
@@ -2,7 +2,7 @@
  *
  *  BlueZ - Bluetooth protocol stack for Linux
  *
- *  Copyright (C) 2012  Tieto Poland
+ *  Copyright (C) 2012-2013  Tieto Poland
  *
  *
  *  This program is free software; you can redistribute it and/or modify
-- 
1.8.1.1


^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox