2012-11-09 08:31:28

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH BlueZ 1/2] build: Require D-Bus 1.5 or later

The gdbus require D-Bus 1.5 version.

Log:
CC gdbus/object.o
gdbus/object.c: In function ‘properties_set’:
gdbus/object.c:876:7: error: ‘DBUS_ERROR_UNKNOWN_PROPERTY’ undeclared
(first use in this function)
gdbus/object.c:876:7: note: each undeclared identifier is reported
only once for each function it appears in
gdbus/object.c:881:6: error: ‘DBUS_ERROR_PROPERTY_READ_ONLY’
undeclared (first use in this function)
make[1]: *** [gdbus/object.o] Error 1
make: *** [all] Error 2
---
acinclude.m4 | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/acinclude.m4 b/acinclude.m4
index ddc8183..1ae402c 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -92,8 +92,8 @@ AC_DEFUN([AC_INIT_BLUEZ], [
])

AC_DEFUN([AC_PATH_DBUS], [
- PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.4, dummy=yes,
- AC_MSG_ERROR(D-Bus >= 1.4 is required))
+ PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.5, dummy=yes,
+ AC_MSG_ERROR(D-Bus >= 1.5 is required))
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
])
--
1.7.4.1



2012-11-19 14:09:23

by Syam Sidhardhan

[permalink] [raw]
Subject: Re: [PATCH BlueZ 2/2] l2test: Add support to test auto select PSM

Hi Johan,

On Fri, Nov 16, 2012 at 1:35 PM, Johan Hedberg <[email protected]> wrote:
> Hi Syam,
>
> On Fri, Nov 09, 2012, Syam Sidhardhan wrote:
>> This patch enable us to test the auto select PSM by passing
>> PSM value as 0.
>>
>> Ex: l2test -d -P 0
>> l2test[2585]: Waiting for connection on psm 4099 ...
>> ---
>> test/l2test.c | 4 +---
>> 1 files changed, 1 insertions(+), 3 deletions(-)
>>
>> diff --git a/test/l2test.c b/test/l2test.c
>> index 7645681..72ad4ba 100644
>> --- a/test/l2test.c
>> +++ b/test/l2test.c
>> @@ -87,7 +87,7 @@ static long buffer_size = 2048;
>>
>> /* Default addr and psm and cid */
>> static bdaddr_t bdaddr;
>> -static unsigned short psm = 0x1011;
>> +static unsigned short psm = 0;
>> static unsigned short cid = 0;
>>
>> /* Default number of frames to send (-1 = infinite) */
>> @@ -375,8 +375,6 @@ static int do_connect(char *svr)
>> addr.l2_cid = htobs(cid);
>> else if (psm)
>> addr.l2_psm = htobs(psm);
>> - else
>> - goto error;
>>
>> if (connect(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0 ) {
>> syslog(LOG_ERR, "Can't connect: %s (%d)",
>
> At least the second chunk is for the initiating (client) part, not the
> server (which the commit message implies you're dealing with). There's
> no "auto select" for the client.
>

True. While preparing the patch it got misplaced.
I'll send an updated version.

Thanks,
Syam.

2012-11-16 08:05:28

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH BlueZ 2/2] l2test: Add support to test auto select PSM

Hi Syam,

On Fri, Nov 09, 2012, Syam Sidhardhan wrote:
> This patch enable us to test the auto select PSM by passing
> PSM value as 0.
>
> Ex: l2test -d -P 0
> l2test[2585]: Waiting for connection on psm 4099 ...
> ---
> test/l2test.c | 4 +---
> 1 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/test/l2test.c b/test/l2test.c
> index 7645681..72ad4ba 100644
> --- a/test/l2test.c
> +++ b/test/l2test.c
> @@ -87,7 +87,7 @@ static long buffer_size = 2048;
>
> /* Default addr and psm and cid */
> static bdaddr_t bdaddr;
> -static unsigned short psm = 0x1011;
> +static unsigned short psm = 0;
> static unsigned short cid = 0;
>
> /* Default number of frames to send (-1 = infinite) */
> @@ -375,8 +375,6 @@ static int do_connect(char *svr)
> addr.l2_cid = htobs(cid);
> else if (psm)
> addr.l2_psm = htobs(psm);
> - else
> - goto error;
>
> if (connect(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0 ) {
> syslog(LOG_ERR, "Can't connect: %s (%d)",

At least the second chunk is for the initiating (client) part, not the
server (which the commit message implies you're dealing with). There's
no "auto select" for the client.

Johan

2012-11-09 10:44:27

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [PATCH BlueZ 1/2] build: Require D-Bus 1.5 or later

Hi Syam,

> The gdbus require D-Bus 1.5 version.
>
> Log:
> CC gdbus/object.o
> gdbus/object.c: In function ‘properties_set’:
> gdbus/object.c:876:7: error: ‘DBUS_ERROR_UNKNOWN_PROPERTY’ undeclared
> (first use in this function)
> gdbus/object.c:876:7: note: each undeclared identifier is reported
> only once for each function it appears in
> gdbus/object.c:881:6: error: ‘DBUS_ERROR_PROPERTY_READ_ONLY’
> undeclared (first use in this function)
> make[1]: *** [gdbus/object.o] Error 1
> make: *** [all] Error 2

if they are still simple defines, then lets just #ifndef them and define
them in gdbus/object.c

Regards

Marcel



2012-11-09 08:31:29

by Syam Sidhardhan

[permalink] [raw]
Subject: [PATCH BlueZ 2/2] l2test: Add support to test auto select PSM

This patch enable us to test the auto select PSM by passing
PSM value as 0.

Ex: l2test -d -P 0
l2test[2585]: Waiting for connection on psm 4099 ...
---
test/l2test.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/test/l2test.c b/test/l2test.c
index 7645681..72ad4ba 100644
--- a/test/l2test.c
+++ b/test/l2test.c
@@ -87,7 +87,7 @@ static long buffer_size = 2048;

/* Default addr and psm and cid */
static bdaddr_t bdaddr;
-static unsigned short psm = 0x1011;
+static unsigned short psm = 0;
static unsigned short cid = 0;

/* Default number of frames to send (-1 = infinite) */
@@ -375,8 +375,6 @@ static int do_connect(char *svr)
addr.l2_cid = htobs(cid);
else if (psm)
addr.l2_psm = htobs(psm);
- else
- goto error;

if (connect(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0 ) {
syslog(LOG_ERR, "Can't connect: %s (%d)",
--
1.7.4.1