OSDN Git Service
Marcel Holtmann [Fri, 4 Jan 2013 19:32:23 +0000 (11:32 -0800)]
core: Handle result callback for setting local name
Marcel Holtmann [Fri, 4 Jan 2013 19:23:41 +0000 (11:23 -0800)]
core: Be safe and cancel all pending global commands
Marcel Holtmann [Fri, 4 Jan 2013 19:20:07 +0000 (11:20 -0800)]
core: Fix memory leaks and management error handling
Marcel Holtmann [Fri, 4 Jan 2013 19:06:41 +0000 (11:06 -0800)]
core: Cancel all pending commands for the index on adapter removal
Marcel Holtmann [Fri, 4 Jan 2013 19:04:43 +0000 (11:04 -0800)]
shared: Add support for canceling all management request of one index
Marcel Holtmann [Fri, 4 Jan 2013 18:54:10 +0000 (10:54 -0800)]
core: Unregister all handlers for the index on adapter removal
Marcel Holtmann [Fri, 4 Jan 2013 18:48:20 +0000 (10:48 -0800)]
core: Separate between master mgmt and adapter mgmt references
To actually get a clean split between the global mgmt reference
and the adpater references, rename the global one to mgmt_master.
Also start using the adapter specific reference and not being lazy
with the global one.
Marcel Holtmann [Fri, 4 Jan 2013 18:39:50 +0000 (10:39 -0800)]
core: Make the mgmt struct and version/revision variables private
Marcel Holtmann [Fri, 4 Jan 2013 18:39:02 +0000 (10:39 -0800)]
core: Be safe and unregister index added/removed handlers
Johan Hedberg [Fri, 4 Jan 2013 18:03:19 +0000 (20:03 +0200)]
core: Fix calling of adapter_update_settings for powered changes
Johan Hedberg [Fri, 4 Jan 2013 16:58:11 +0000 (18:58 +0200)]
core: Fix up adapter ref count name and type
Johan Hedberg [Fri, 4 Jan 2013 16:50:14 +0000 (18:50 +0200)]
core: Create an adapter already in index_added/read_index_list
This patch refactors the adapter_create and adapter_register functions
so that an uninitialized adapter object can be created in
index_added/read_index_list but only registered when the read_info
response comes.
Johan Hedberg [Fri, 4 Jan 2013 16:20:53 +0000 (18:20 +0200)]
Revert "tools: Update mgmt-tester to use the new mgmt_send API"
This reverts commit
21c54f9abc2d7ba74abf28fab33e4ffd3f465cc8.
Johan Hedberg [Fri, 4 Jan 2013 16:20:22 +0000 (18:20 +0200)]
Revert "core: Add index parameter to mgmt_request_func_t callback"
This reverts commit
c2c64bf32218b389c856ec0142c66b4cdfc6a689.
The extra index parameter isn't that useful after all.
Anderson Lizardo [Fri, 4 Jan 2013 13:47:02 +0000 (09:47 -0400)]
unit: Fix compilation issue with ignored return value
Fix this compilation warning:
unit/test-sdp.c: In function ‘send_pdu’:
unit/test-sdp.c:600:7: error: ignoring return value of ‘write’, declared
with attribute warn_unused_result [-Werror=unused-result]
Jaganath Kanakkassery [Fri, 4 Jan 2013 05:42:28 +0000 (11:12 +0530)]
rfkill: Fix count parameter in read
Since g_str_has_prefix() has been used with the output buffer of read
it should be nul terminated
Jaganath Kanakkassery [Fri, 4 Jan 2013 05:42:27 +0000 (11:12 +0530)]
storage: Fix memory leak
If bt_uuid2string() returns NULL then svcclass has to be freed
Johan Hedberg [Fri, 4 Jan 2013 13:35:55 +0000 (15:35 +0200)]
core: Use mgmt settings to track adapter state
This will help merge src/mgmt.c functionality straight into adapter.c.
Johan Hedberg [Fri, 4 Jan 2013 13:28:42 +0000 (15:28 +0200)]
core: Remove Pairable setting from adapter storage
This storage setting wasn't used anyway (all adapters would
unconditionally have pairable enabled at startup) and removing it makes
the soon to follow conversion to use mgmt settings easier. The storage
can be brought back later if necessary.
Johan Hedberg [Fri, 4 Jan 2013 12:39:16 +0000 (14:39 +0200)]
test: Update test-adapter to deal with the new Alias property
Johan Hedberg [Fri, 4 Jan 2013 12:35:47 +0000 (14:35 +0200)]
core: Remove unused btd_adapter_get_major_minor function
Johan Hedberg [Fri, 4 Jan 2013 12:34:43 +0000 (14:34 +0200)]
core: Remove unused mgmt_set_name function
Johan Hedberg [Fri, 4 Jan 2013 12:34:17 +0000 (14:34 +0200)]
core: Make mgmt_set_dev_class static to mgmt.c
Johan Hedberg [Fri, 4 Jan 2013 12:33:37 +0000 (14:33 +0200)]
core: Remove unused mgmt_read_bdaddr function
Johan Hedberg [Fri, 4 Jan 2013 12:32:27 +0000 (14:32 +0200)]
core: Move adapter unregistration from mgmt.c to adapter.c
Johan Hedberg [Fri, 4 Jan 2013 12:29:31 +0000 (14:29 +0200)]
core: Move adapter registration from mgmt.c to adapter.c
Johan Hedberg [Fri, 4 Jan 2013 12:23:47 +0000 (14:23 +0200)]
core: Fix check for already existing adapter
Johan Hedberg [Fri, 4 Jan 2013 11:23:34 +0000 (13:23 +0200)]
core: Add proper error status checks for mgmt commands in adapter.c
Johan Hedberg [Fri, 4 Jan 2013 10:25:38 +0000 (12:25 +0200)]
core: Add basic mgmt_read_info support to adapter.c
Johan Hedberg [Fri, 4 Jan 2013 10:24:31 +0000 (12:24 +0200)]
core: Update adapter.c code to match the new mgmt_send API
Johan Hedberg [Fri, 4 Jan 2013 09:49:43 +0000 (11:49 +0200)]
tools: Update mgmt-tester to use the new mgmt_send API
Johan Hedberg [Fri, 4 Jan 2013 09:48:45 +0000 (11:48 +0200)]
core: Add index parameter to mgmt_request_func_t callback
Lucas De Marchi [Fri, 4 Jan 2013 03:33:44 +0000 (01:33 -0200)]
gdbus: Don't include just added interfaces in GetManagedObjects
If we received a call to ObjectManager.GetManagedObject we should not
include in the response the interfaces in data->added. This is because
it's not guaranteed that those interfaces will trigger an
InterfacesAdded signal, which is the case if the interface is removed in
the same mainloop iteration.
Lucas De Marchi [Fri, 4 Jan 2013 01:21:04 +0000 (23:21 -0200)]
gdbus: Simplify generated introspection
The generated introspection is not supposed to be read as is by human,
so there's no point in printing the indentation or writing more code to
use auto-close tags.
If it's desired to read the raw xml file, user can always use other
tools to transform the output such as "xmllint --format".
This also fixes a missing </property> when property is deprecated.
Lucas De Marchi [Fri, 4 Jan 2013 01:21:03 +0000 (23:21 -0200)]
build: Do not use deprecated AM_CONFIG_HEADER
The long-obsoleted AM_CONFIG_HEADER macro was removed in automake 1.13.
Use AC_CONFIG_HEADERS instead.
Marcel Holtmann [Fri, 4 Jan 2013 05:26:54 +0000 (21:26 -0800)]
unit: Add tool for testing the SDP protocol PDUs
Marcel Holtmann [Fri, 4 Jan 2013 04:18:00 +0000 (20:18 -0800)]
core: Reset access and service database pointers on shutdown
Marcel Holtmann [Fri, 4 Jan 2013 03:46:10 +0000 (19:46 -0800)]
core: Avoid using main_opts structure inside SDP service handling
Marcel Holtmann [Thu, 3 Jan 2013 23:51:30 +0000 (15:51 -0800)]
unit: Add simpler mgmt unit test utility
Giovanni Gherdovich [Thu, 3 Jan 2013 19:37:15 +0000 (20:37 +0100)]
AVCTP: Replace calls to g_queue_free_full function
The function g_queue_free_full is available only from GLib 2.32.
If BlueZ has to build against GLib 2.28, as stated in the configure.ac,
this patch replaces the calls to g_queue_free_full in the AVTCP module
with its body, taken from the sources of GLib 2.32.
Giovanni Gherdovich [Thu, 3 Jan 2013 19:37:02 +0000 (20:37 +0100)]
core: Replace calls to g_queue_free_full function
The function g_queue_free_full is available only from GLib 2.32.
If BlueZ has to build against GLib 2.28, as stated in the configure.ac,
this patch replaces the calls to g_queue_free_full in the "core" BlueZ module
with its body, taken from the sources of GLib 2.32.
Paulo Borges [Thu, 3 Jan 2013 18:57:18 +0000 (15:57 -0300)]
attrib-server: Fix invalid device access
When the device is not found, the channel attach must fail.
Johan Hedberg [Thu, 3 Jan 2013 19:53:54 +0000 (21:53 +0200)]
core: Use btohs when special alignment handling is not needed
Johan Hedberg [Thu, 3 Jan 2013 19:03:49 +0000 (21:03 +0200)]
core: Add adapter.c stubs for index added/removed events
Johan Hedberg [Thu, 3 Jan 2013 18:57:03 +0000 (20:57 +0200)]
core: Add initial mgmt_read_index_list support to adapter.c
Johan Hedberg [Thu, 3 Jan 2013 18:51:51 +0000 (20:51 +0200)]
core: Add initial mgmt version reading to adapter.c
Johan Hedberg [Thu, 3 Jan 2013 17:15:52 +0000 (19:15 +0200)]
core: Remove redundant mgmt_unregister_all call (handled by unref)
Anderson Lizardo [Thu, 3 Jan 2013 14:15:03 +0000 (10:15 -0400)]
input: Fix closing sockets when ioctl_connadd() fails
Instead of calling close() directly, properly shutdown the channel and
set GIOChannel pointers to NULL.
Fixes this error detected when HIDP support is disabled on kernel and we
attempt to connect to a BT keyboard:
bluetoothd[5168]: profiles/input/device.c:encrypt_notify()
bluetoothd[5168]: ioctl_connadd(): Protocol not supported(93)
bluetoothd[5168]: profiles/input/device.c:ctrl_watch_cb() Device
CA:FE:CA:FE:CA:FE disconnected
(bluetoothd:5168): GLib-WARNING **: Invalid file descriptor.
bluetoothd[5168]: profiles/input/device.c:intr_watch_cb() Device
CA:FE:CA:FE:CA:FE disconnected
(bluetoothd:5168): GLib-WARNING **: Invalid file descriptor.
Anderson Lizardo [Thu, 3 Jan 2013 14:15:02 +0000 (10:15 -0400)]
input: Minor whitespace fixes
Anderson Lizardo [Thu, 3 Jan 2013 14:15:01 +0000 (10:15 -0400)]
input: Remove unnecessary encrypt_completed() function
Its code is used only once, and can be made much simpler if moved to
encrypt_notify().
Anderson Lizardo [Thu, 3 Jan 2013 14:15:00 +0000 (10:15 -0400)]
input: Remove unnecessary goto label
Instead, use "if (err < 0)" for error handling.
Anderson Lizardo [Thu, 3 Jan 2013 14:14:59 +0000 (10:14 -0400)]
input: Use g_free() where appropriate
req->rd_data was allocated with g_try_malloc0(), therefore it should be
freed with g_free().
Anderson Lizardo [Thu, 3 Jan 2013 14:14:58 +0000 (10:14 -0400)]
input: Remove dead code from encrypt_completed()
"status" is always zero, so this code will never be reached.
Johan Hedberg [Thu, 3 Jan 2013 14:57:28 +0000 (16:57 +0200)]
core: Introduce initial hooks to new mgmt code for adapter.c
Johan Hedberg [Thu, 3 Jan 2013 14:53:55 +0000 (16:53 +0200)]
core: Fix Device1.Connect() continuation even if one profile fails
Johan Hedberg [Thu, 3 Jan 2013 14:03:11 +0000 (16:03 +0200)]
core: Pass the mgmt settings directly to adapter_register()
Johan Hedberg [Thu, 3 Jan 2013 13:44:51 +0000 (15:44 +0200)]
core: Move mgmt setting convenience macros to lib/mgmt.h
Johan Hedberg [Thu, 3 Jan 2013 12:54:04 +0000 (14:54 +0200)]
core: Make btd_adapter_set_did private to adapter.c
Johan Hedberg [Thu, 3 Jan 2013 12:52:32 +0000 (14:52 +0200)]
core: Make adapter_setup private to adapter.c
Johan Hedberg [Thu, 3 Jan 2013 12:51:43 +0000 (14:51 +0200)]
core: Make adapter_remove private to adapter.c
Johan Hedberg [Thu, 3 Jan 2013 12:50:45 +0000 (14:50 +0200)]
core: Make adapter_create private to adapter.c
Johan Hedberg [Thu, 3 Jan 2013 12:45:55 +0000 (14:45 +0200)]
core: Remove manager.{c,h}
Johan Hedberg [Thu, 3 Jan 2013 12:39:34 +0000 (14:39 +0200)]
core: Move adapter list handling from manager.c to adapter.c
Johan Hedberg [Thu, 3 Jan 2013 12:24:55 +0000 (14:24 +0200)]
core: Remove useless manager.h includes
Johan Hedberg [Thu, 3 Jan 2013 12:23:37 +0000 (14:23 +0200)]
core: Prefer adapter_register/unregister over manager functions
Johan Hedberg [Thu, 3 Jan 2013 12:19:07 +0000 (14:19 +0200)]
core: Introduce new adapter_register/unregister() functions
Johan Hedberg [Thu, 3 Jan 2013 12:15:37 +0000 (14:15 +0200)]
neard: Prefer adapter_get_default() over manager function
Johan Hedberg [Thu, 3 Jan 2013 12:15:23 +0000 (14:15 +0200)]
hostname: Prefer adapter_get_default() over manager function
Johan Hedberg [Thu, 3 Jan 2013 12:13:38 +0000 (14:13 +0200)]
core: Introduce adapter_get_default() function
Johan Hedberg [Thu, 3 Jan 2013 12:11:46 +0000 (14:11 +0200)]
core: Prefer adapter_foreach over manager function
Johan Hedberg [Thu, 3 Jan 2013 12:11:25 +0000 (14:11 +0200)]
audio: Prefer adapter_foreach over manager function
Johan Hedberg [Thu, 3 Jan 2013 12:11:02 +0000 (14:11 +0200)]
hostname: Prefer adapter_foreach over manager function
Johan Hedberg [Thu, 3 Jan 2013 10:55:41 +0000 (12:55 +0200)]
core: Introduce an adapter_foreach() function
Johan Hedberg [Thu, 3 Jan 2013 10:52:55 +0000 (12:52 +0200)]
core: Prefer adapter_find functions over manager ones
Johan Hedberg [Thu, 3 Jan 2013 10:51:36 +0000 (12:51 +0200)]
health: Prefer adapter_find functions over manager ones
Johan Hedberg [Thu, 3 Jan 2013 10:51:19 +0000 (12:51 +0200)]
audio: Prefer adapter_find functions over manager ones
Johan Hedberg [Thu, 3 Jan 2013 10:52:29 +0000 (12:52 +0200)]
core: Introduce adapter_find_by_id() function
Johan Hedberg [Thu, 3 Jan 2013 10:43:23 +0000 (12:43 +0200)]
core: Introduce an adapter_find() function
Johan Hedberg [Thu, 3 Jan 2013 10:40:00 +0000 (12:40 +0200)]
core: Introduce an adapter_cleanup() function
Johan Hedberg [Thu, 3 Jan 2013 10:35:03 +0000 (12:35 +0200)]
core: Rename adapter_init() to adapter_setup()
Johan Hedberg [Thu, 3 Jan 2013 10:32:15 +0000 (12:32 +0200)]
core: Remove unneeded manager_init()
Marcel Holtmann [Thu, 3 Jan 2013 09:08:59 +0000 (01:08 -0800)]
tools: Use connectable and powered setup stages for discoverable tests
Marcel Holtmann [Thu, 3 Jan 2013 08:48:59 +0000 (00:48 -0800)]
tools: Fix tests for discoverable management commands
Marcel Holtmann [Thu, 3 Jan 2013 08:19:23 +0000 (00:19 -0800)]
tools: Add first set of discoverable management commands
Marcel Holtmann [Thu, 3 Jan 2013 07:00:35 +0000 (23:00 -0800)]
tools: Use second management channel to monitor events
Marcel Holtmann [Thu, 3 Jan 2013 06:45:16 +0000 (22:45 -0800)]
tools: Add support for checking return value of commands
Marcel Holtmann [Thu, 3 Jan 2013 06:32:30 +0000 (22:32 -0800)]
tools: Add a few more extra invalid parameters tests
Marcel Holtmann [Thu, 3 Jan 2013 06:19:32 +0000 (22:19 -0800)]
tools: Add testing for powered, connectable and pairable commands
Marcel Holtmann [Wed, 2 Jan 2013 23:35:37 +0000 (15:35 -0800)]
unit: Use separate context for each D-Bus test case
Marcel Holtmann [Wed, 2 Jan 2013 15:35:53 +0000 (07:35 -0800)]
gdbus: Hold client reference during get name owner reply
Marcin Zawiejski [Mon, 31 Dec 2012 14:00:54 +0000 (15:00 +0100)]
obexd: Fix crash while removing session
Crash occurs when removing a session with RemoveSession while another
session has been created but not yet registered.
Backtrace:
0 __strcmp_ssse3 () at ../sysdeps/i386/i686/multiarch/strcmp-ssse3.S:233
1 0xb758e7c3 in g_str_equal () from /lib/i386-linux-gnu/libglib-2.0.so.0
2 0x08073e56 in find_session (path=0x85c8504 "/org/bluez/obex/session0") at obexd/client/manager.c:146
3 remove_session (connection=0x85bc5e0, message=0x85bca98, user_data=0x0) at obexd/client/manager.c:216
4 0x08055f6f in process_message (connection=0x85bc5e0, message=<optimized out>, iface_user_data=0x0,
method=<optimized out>, method=<optimized out>) at gdbus/object.c:285
5 0xb7672666 in ?? () from /lib/i386-linux-gnu/libdbus-1.so.3
6 0xb76624d7 in dbus_connection_dispatch () from /lib/i386-linux-gnu/libdbus-1.so.3
7 0x080532f8 in message_dispatch (data=0x85bc5e0) at gdbus/mainloop.c:76
8 0xb759f6bf in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
9 0xb759e9e3 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
10 0xb759ed80 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
11 0xb759f1db in g_main_loop_run () from /lib/i386-linux-gnu/libglib-2.0.so.0
12 0x08052d74 in main (argc=1, argv=0xbfb344e4) at obexd/src/main.c:323
Marcel Holtmann [Wed, 2 Jan 2013 01:36:48 +0000 (17:36 -0800)]
core: Add a few more debug statements to adapter handling
Marcel Holtmann [Wed, 2 Jan 2013 01:12:43 +0000 (17:12 -0800)]
shared: Add missing include for standard integers
Marcel Holtmann [Wed, 2 Jan 2013 01:11:48 +0000 (17:11 -0800)]
tools: Add first GAP test for adapter setup
Marcel Holtmann [Tue, 1 Jan 2013 20:35:09 +0000 (12:35 -0800)]
tools: Move HCI emulation to shared source area
Marcel Holtmann [Tue, 1 Jan 2013 20:28:42 +0000 (12:28 -0800)]
tools: Add initial set of basic management interface tests
Marcel Holtmann [Tue, 1 Jan 2013 20:20:38 +0000 (12:20 -0800)]
tools: Add post command hook support to HCI emulation
Marcel Holtmann [Tue, 1 Jan 2013 20:14:25 +0000 (12:14 -0800)]
shared: Add user data support to tester framework
Marcel Holtmann [Tue, 1 Jan 2013 16:21:34 +0000 (08:21 -0800)]
shared: Measure execution time for tester framework
Marcel Holtmann [Tue, 1 Jan 2013 10:24:21 +0000 (02:24 -0800)]
tools: Add skeleton for management interface tester