* [PATCH BlueZ v3 2/5] gitignore: Add missing tools
2013-06-21 14:17 [PATCH BlueZ v3 1/5] build-sys: Don't build gdbus several times Lucas De Marchi
@ 2013-06-21 14:17 ` Lucas De Marchi
2013-06-21 14:17 ` [PATCH BlueZ v3 3/5] adapter: Remove never used parameter Lucas De Marchi
` (3 subsequent siblings)
4 siblings, 0 replies; 10+ messages in thread
From: Lucas De Marchi @ 2013-06-21 14:17 UTC (permalink / raw)
To: linux-bluetooth
From: Lucas De Marchi <lucas.demarchi@intel.com>
---
.gitignore | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.gitignore b/.gitignore
index c6e0ae2..550b350 100644
--- a/.gitignore
+++ b/.gitignore
@@ -59,6 +59,8 @@ tools/avtest
tools/bdaddr
tools/btiotest
tools/mpris-player
+tools/bluetooth-player
+tools/l2cap-tester
test/sap_client.pyc
test/bluezutils.pyc
unit/test-eir
--
1.8.3.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH BlueZ v3 3/5] adapter: Remove never used parameter
2013-06-21 14:17 [PATCH BlueZ v3 1/5] build-sys: Don't build gdbus several times Lucas De Marchi
2013-06-21 14:17 ` [PATCH BlueZ v3 2/5] gitignore: Add missing tools Lucas De Marchi
@ 2013-06-21 14:17 ` Lucas De Marchi
2013-06-21 14:17 ` [PATCH BlueZ v3 4/5] client: Add description for default-agent command Lucas De Marchi
` (2 subsequent siblings)
4 siblings, 0 replies; 10+ messages in thread
From: Lucas De Marchi @ 2013-06-21 14:17 UTC (permalink / raw)
To: linux-bluetooth
From: Lucas De Marchi <lucas.demarchi@intel.com>
adapter_remove_device() is always called with remove_storage set to
TRUE, so remove it.
---
src/adapter.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/src/adapter.c b/src/adapter.c
index 9e817f2..17f5508 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -1019,8 +1019,7 @@ static void service_auth_cancel(struct service_auth *auth)
}
static void adapter_remove_device(struct btd_adapter *adapter,
- struct btd_device *dev,
- gboolean remove_storage)
+ struct btd_device *dev)
{
GList *l;
@@ -1052,7 +1051,7 @@ static void adapter_remove_device(struct btd_adapter *adapter,
service_auth_cancel(auth);
}
- device_remove(dev, remove_storage);
+ device_remove(dev, TRUE);
}
struct btd_device *adapter_get_device(struct btd_adapter *adapter,
@@ -1514,7 +1513,7 @@ static gboolean remove_temp_devices(gpointer user_data)
next = g_slist_next(l);
if (device_is_temporary(dev))
- adapter_remove_device(adapter, dev, TRUE);
+ adapter_remove_device(adapter, dev);
}
return FALSE;
@@ -2141,7 +2140,7 @@ static DBusMessage *remove_device(DBusConnection *conn,
device_set_temporary(device, TRUE);
if (!device_is_connected(device)) {
- adapter_remove_device(adapter, device, TRUE);
+ adapter_remove_device(adapter, device);
return dbus_message_new_method_return(msg);
}
@@ -4252,7 +4251,7 @@ static void adapter_remove_connection(struct btd_adapter *adapter,
const char *path = device_get_path(device);
DBG("Removing temporary device %s", path);
- adapter_remove_device(adapter, device, TRUE);
+ adapter_remove_device(adapter, device);
}
}
@@ -5808,7 +5807,7 @@ static void connect_failed_callback(uint16_t index, uint16_t length,
* when it is temporary. */
if (device && !device_is_bonding(device, NULL)
&& device_is_temporary(device))
- adapter_remove_device(adapter, device, TRUE);
+ adapter_remove_device(adapter, device);
}
static void unpaired_callback(uint16_t index, uint16_t length,
@@ -5839,7 +5838,7 @@ static void unpaired_callback(uint16_t index, uint16_t length,
if (device_is_connected(device))
device_request_disconnect(device, NULL);
else
- adapter_remove_device(adapter, device, TRUE);
+ adapter_remove_device(adapter, device);
}
static void read_info_complete(uint8_t status, uint16_t length,
--
1.8.3.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH BlueZ v3 4/5] client: Add description for default-agent command
2013-06-21 14:17 [PATCH BlueZ v3 1/5] build-sys: Don't build gdbus several times Lucas De Marchi
2013-06-21 14:17 ` [PATCH BlueZ v3 2/5] gitignore: Add missing tools Lucas De Marchi
2013-06-21 14:17 ` [PATCH BlueZ v3 3/5] adapter: Remove never used parameter Lucas De Marchi
@ 2013-06-21 14:17 ` Lucas De Marchi
2013-06-21 14:17 ` [PATCH BlueZ v3 5/5] client: prettify help table Lucas De Marchi
2013-06-21 22:02 ` [PATCH BlueZ v3 1/5] build-sys: Don't build gdbus several times Marcel Holtmann
4 siblings, 0 replies; 10+ messages in thread
From: Lucas De Marchi @ 2013-06-21 14:17 UTC (permalink / raw)
To: linux-bluetooth
From: Lucas De Marchi <lucas.demarchi@intel.com>
---
client/main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/client/main.c b/client/main.c
index b0a66d8..ff2afc6 100644
--- a/client/main.c
+++ b/client/main.c
@@ -1057,7 +1057,8 @@ static const struct {
{ "agent", "<on/off/capability>", cmd_agent,
"Enable/disable agent with given capability",
capability_generator},
- { "default-agent",NULL, cmd_default_agent },
+ { "default-agent",NULL, cmd_default_agent,
+ "Set agent as the default one" },
{ "scan", "<on/off>", cmd_scan, "Scan for devices" },
{ "info", "<dev>", cmd_info, "Device information",
dev_generator },
--
1.8.3.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH BlueZ v3 5/5] client: prettify help table
2013-06-21 14:17 [PATCH BlueZ v3 1/5] build-sys: Don't build gdbus several times Lucas De Marchi
` (2 preceding siblings ...)
2013-06-21 14:17 ` [PATCH BlueZ v3 4/5] client: Add description for default-agent command Lucas De Marchi
@ 2013-06-21 14:17 ` Lucas De Marchi
2013-06-24 8:14 ` Johan Hedberg
2013-06-21 22:02 ` [PATCH BlueZ v3 1/5] build-sys: Don't build gdbus several times Marcel Holtmann
4 siblings, 1 reply; 10+ messages in thread
From: Lucas De Marchi @ 2013-06-21 14:17 UTC (permalink / raw)
To: linux-bluetooth
From: Lucas De Marchi <lucas.demarchi@intel.com>
cmd + options have a maximum length of 25. Align the description
after this value. In order not to reach 80 chars so easily change the
first \t to 2 spaces, like is done in udev, kmod, systemd, etc.
---
client/main.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/client/main.c b/client/main.c
index ff2afc6..0dd1510 100644
--- a/client/main.c
+++ b/client/main.c
@@ -1184,9 +1184,10 @@ static void rl_handler(char *input)
for (i = 0; cmd_table[i].cmd; i++) {
if (cmd_table[i].desc)
- printf("\t%s %s\t%s\n", cmd_table[i].cmd,
- cmd_table[i].arg ? : " ",
- cmd_table[i].desc);
+ printf(" %s %-*s %s\n", cmd_table[i].cmd,
+ (int)(25 - strlen(cmd_table[i].cmd)),
+ cmd_table[i].arg ? : "",
+ cmd_table[i].desc ? : "");
}
done:
--
1.8.3.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH BlueZ v3 5/5] client: prettify help table
2013-06-21 14:17 ` [PATCH BlueZ v3 5/5] client: prettify help table Lucas De Marchi
@ 2013-06-24 8:14 ` Johan Hedberg
0 siblings, 0 replies; 10+ messages in thread
From: Johan Hedberg @ 2013-06-24 8:14 UTC (permalink / raw)
To: Lucas De Marchi; +Cc: linux-bluetooth
Hi Lucas,
On Fri, Jun 21, 2013, Lucas De Marchi wrote:
> cmd + options have a maximum length of 25. Align the description
> after this value. In order not to reach 80 chars so easily change the
> first \t to 2 spaces, like is done in udev, kmod, systemd, etc.
> ---
> client/main.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
Patches 2-5 have been applied. Thanks.
Johan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH BlueZ v3 1/5] build-sys: Don't build gdbus several times
2013-06-21 14:17 [PATCH BlueZ v3 1/5] build-sys: Don't build gdbus several times Lucas De Marchi
` (3 preceding siblings ...)
2013-06-21 14:17 ` [PATCH BlueZ v3 5/5] client: prettify help table Lucas De Marchi
@ 2013-06-21 22:02 ` Marcel Holtmann
2013-06-21 22:37 ` Lucas De Marchi
4 siblings, 1 reply; 10+ messages in thread
From: Marcel Holtmann @ 2013-06-21 22:02 UTC (permalink / raw)
To: Lucas De Marchi; +Cc: linux-bluetooth
Hi Lucas,
> We are currently compiling gdbus 3 times: one for tests, one for
> bluetoothd and another for obexd.
we recompile because of the different CFLAGS for these binaries.
> $ ls gdbus/*watch.o
> gdbus/bluetoothd-watch.o gdbus/obexd-watch.o gdbus/watch.o
>
> Instead of prepending $(gdbus_sources) to several _SOURCES variable, use
> a convenience library.
When we switched to non-recursive build, we stopped building interim libraries. What is the benefit of going back to building them. I am personally fine with building gdbus several times.
Regards
Marcel
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH BlueZ v3 1/5] build-sys: Don't build gdbus several times
2013-06-21 22:02 ` [PATCH BlueZ v3 1/5] build-sys: Don't build gdbus several times Marcel Holtmann
@ 2013-06-21 22:37 ` Lucas De Marchi
2013-06-21 22:47 ` Marcel Holtmann
0 siblings, 1 reply; 10+ messages in thread
From: Lucas De Marchi @ 2013-06-21 22:37 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: BlueZ development
On Fri, Jun 21, 2013 at 7:02 PM, Marcel Holtmann <marcel@holtmann.org> wrot=
e:
> Hi Lucas,
>
>> We are currently compiling gdbus 3 times: one for tests, one for
>> bluetoothd and another for obexd.
>
> we recompile because of the different CFLAGS for these binaries.
But they shouldn=B4t be affecting gdbus.
>
>> $ ls gdbus/*watch.o
>> gdbus/bluetoothd-watch.o gdbus/obexd-watch.o gdbus/watch.o
>>
>> Instead of prepending $(gdbus_sources) to several _SOURCES variable, use
>> a convenience library.
>
> When we switched to non-recursive build, we stopped building interim libr=
aries. What is the benefit of going back to building them. I am personally =
fine with building gdbus several times.
It=B4s more that there=B4s no advantage doing otherwise. The small benefit
is building less files and letting it simpler.
Lucas De Marchi
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH BlueZ v3 1/5] build-sys: Don't build gdbus several times
2013-06-21 22:37 ` Lucas De Marchi
@ 2013-06-21 22:47 ` Marcel Holtmann
2013-06-25 18:50 ` Lucas De Marchi
0 siblings, 1 reply; 10+ messages in thread
From: Marcel Holtmann @ 2013-06-21 22:47 UTC (permalink / raw)
To: Lucas De Marchi; +Cc: BlueZ development
Hi Lucas,
>>> We are currently compiling gdbus 3 times: one for tests, one for
>>> bluetoothd and another for obexd.
>>
>> we recompile because of the different CFLAGS for these binaries.
>
> But they shouldn´t be affecting gdbus.
>
>>
>>> $ ls gdbus/*watch.o
>>> gdbus/bluetoothd-watch.o gdbus/obexd-watch.o gdbus/watch.o
>>>
>>> Instead of prepending $(gdbus_sources) to several _SOURCES variable, use
>>> a convenience library.
>>
>> When we switched to non-recursive build, we stopped building interim libraries. What is the benefit of going back to building them. I am personally fine with building gdbus several times.
>
> It´s more that there´s no advantage doing otherwise. The small benefit
> is building less files and letting it simpler.
then at least get into a bit of a standard habit. We are building libbluetooth into a public and private version.
Currently we name it libbluetooth-private, but maybe following the systemd "standard", we should start calling that libbluetooth-internal. And then libgdbus-internal.
You also do realize that I will make you do this for all other projects using gdbus.
Regards
Marcel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH BlueZ v3 1/5] build-sys: Don't build gdbus several times
2013-06-21 22:47 ` Marcel Holtmann
@ 2013-06-25 18:50 ` Lucas De Marchi
0 siblings, 0 replies; 10+ messages in thread
From: Lucas De Marchi @ 2013-06-25 18:50 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: BlueZ development
On Fri, Jun 21, 2013 at 7:47 PM, Marcel Holtmann <marcel@holtmann.org> wrot=
e:
> Hi Lucas,
>
>>>> We are currently compiling gdbus 3 times: one for tests, one for
>>>> bluetoothd and another for obexd.
>>>
>>> we recompile because of the different CFLAGS for these binaries.
>>
>> But they shouldn=B4t be affecting gdbus.
>>
>>>
>>>> $ ls gdbus/*watch.o
>>>> gdbus/bluetoothd-watch.o gdbus/obexd-watch.o gdbus/watch.o
>>>>
>>>> Instead of prepending $(gdbus_sources) to several _SOURCES variable, u=
se
>>>> a convenience library.
>>>
>>> When we switched to non-recursive build, we stopped building interim li=
braries. What is the benefit of going back to building them. I am personall=
y fine with building gdbus several times.
>>
>> It=B4s more that there=B4s no advantage doing otherwise. The small benef=
it
>> is building less files and letting it simpler.
>
> then at least get into a bit of a standard habit. We are building libblue=
tooth into a public and private version.
>
> Currently we name it libbluetooth-private, but maybe following the system=
d "standard", we should start calling that libbluetooth-internal. And then =
libgdbus-internal.
ok
>
> You also do realize that I will make you do this for all other projects u=
sing gdbus.
hahaha... ok
Lucas De Marchi
^ permalink raw reply [flat|nested] 10+ messages in thread