OSDN Git Service

android-x86/external-bluetooth-bluez.git
11 years agocore: Use btd_adapter_get_index instead of adapter_get_dev_id
Marcel Holtmann [Sat, 5 Jan 2013 23:28:34 +0000 (15:28 -0800)]
core: Use btd_adapter_get_index instead of adapter_get_dev_id

11 years agocore: Provide new exported function for getting the index
Marcel Holtmann [Sat, 5 Jan 2013 23:24:03 +0000 (15:24 -0800)]
core: Provide new exported function for getting the index

11 years agocore: Remove old adapter_get_default function
Marcel Holtmann [Sat, 5 Jan 2013 23:21:24 +0000 (15:21 -0800)]
core: Remove old adapter_get_default function

11 years agoplugins: Use btd_adapter_get_default instead of adapter_get_default
Marcel Holtmann [Sat, 5 Jan 2013 23:19:10 +0000 (15:19 -0800)]
plugins: Use btd_adapter_get_default instead of adapter_get_default

11 years agocore: Add exported functions for adapter default handling
Marcel Holtmann [Sat, 5 Jan 2013 23:18:45 +0000 (15:18 -0800)]
core: Add exported functions for adapter default handling

11 years agocore: Make ADAPTER_INTERFACE constant private
Marcel Holtmann [Sat, 5 Jan 2013 21:00:31 +0000 (13:00 -0800)]
core: Make ADAPTER_INTERFACE constant private

11 years agocore: Use the global D-Bus connection variable within adapter handling
Marcel Holtmann [Sat, 5 Jan 2013 20:51:01 +0000 (12:51 -0800)]
core: Use the global D-Bus connection variable within adapter handling

11 years agocore: Remove the obsolete duplicate tracking of controllers
Marcel Holtmann [Sat, 5 Jan 2013 20:26:45 +0000 (12:26 -0800)]
core: Remove the obsolete duplicate tracking of controllers

11 years agocore: Keep the current discovery type inside adapter handling
Marcel Holtmann [Sat, 5 Jan 2013 20:22:23 +0000 (12:22 -0800)]
core: Keep the current discovery type inside adapter handling

11 years agocore: Ignore updates if controller name and short name are identical
Marcel Holtmann [Sat, 5 Jan 2013 20:08:04 +0000 (12:08 -0800)]
core: Ignore updates if controller name and short name are identical

11 years agocore: Track changes to class of device in one place
Marcel Holtmann [Sat, 5 Jan 2013 20:02:36 +0000 (12:02 -0800)]
core: Track changes to class of device in one place

11 years agocore: Differentiate between current alias and actually stored alias
Marcel Holtmann [Sat, 5 Jan 2013 19:47:19 +0000 (11:47 -0800)]
core: Differentiate between current alias and actually stored alias

11 years agocore: Cleanup of the adapter property handling functions
Marcel Holtmann [Sat, 5 Jan 2013 19:23:45 +0000 (11:23 -0800)]
core: Cleanup of the adapter property handling functions

11 years agocore: Set defaults when allocating the adapter structure
Marcel Holtmann [Sat, 5 Jan 2013 19:12:58 +0000 (11:12 -0800)]
core: Set defaults when allocating the adapter structure

11 years agocore: Register the management event handlers after read info success
Marcel Holtmann [Sat, 5 Jan 2013 18:28:51 +0000 (10:28 -0800)]
core: Register the management event handlers after read info success

11 years agocore: Combine adapter registration and setup into on function
Marcel Holtmann [Sat, 5 Jan 2013 18:07:29 +0000 (10:07 -0800)]
core: Combine adapter registration and setup into on function

The setup is actually fully procedural and can not even fail. So no
point in splitting that code accross multiple locations.

11 years agocore: Setup adapter default configuration in one place
Marcel Holtmann [Sat, 5 Jan 2013 17:55:28 +0000 (09:55 -0800)]
core: Setup adapter default configuration in one place

11 years agocore: Remove default option for automatic connect timeout
Marcel Holtmann [Sat, 5 Jan 2013 17:50:40 +0000 (09:50 -0800)]
core: Remove default option for automatic connect timeout

11 years agocore: Simplify the adapter allocation and init procedure
Marcel Holtmann [Sat, 5 Jan 2013 17:26:08 +0000 (09:26 -0800)]
core: Simplify the adapter allocation and init procedure

11 years agocore: Track controller name and short name information
Marcel Holtmann [Sat, 5 Jan 2013 16:35:42 +0000 (08:35 -0800)]
core: Track controller name and short name information

To make any informed decision it is important to actually know what
the current name and short name values of the controller are. So
track this independent from system name and alias.

11 years agocore: Use adapter->system_name for external configured names
Marcel Holtmann [Sat, 5 Jan 2013 16:26:38 +0000 (08:26 -0800)]
core: Use adapter->system_name for external configured names

Plugins and other entities can configure the system name. This is different
from the alias set for an adapter and can also be different from the actual
name set by the controller.

This is needed to track the difference between the current controller name,
the configured system name and an user configured alias.

11 years agocore: Set controller info as soon as it is available
Marcel Holtmann [Sat, 5 Jan 2013 16:21:29 +0000 (08:21 -0800)]
core: Set controller info as soon as it is available

Handing controller info like supported or current settings two functions
down makes no sense. Just store them in the callback after reading the
controller info.

11 years agocore: Create new adapters only in one place instead of two
Marcel Holtmann [Sat, 5 Jan 2013 16:05:15 +0000 (08:05 -0800)]
core: Create new adapters only in one place instead of two

11 years agocore: Don't react to mgmt events until the adapter is registered
Johan Hedberg [Sat, 5 Jan 2013 09:38:55 +0000 (11:38 +0200)]
core: Don't react to mgmt events until the adapter is registered

The up-to-date state info comes in the read_info response (which
triggers the adapter registration) so just ignore any events until that
point.

11 years agocore: There is no user of automatic connections timeout
Marcel Holtmann [Sat, 5 Jan 2013 09:16:24 +0000 (01:16 -0800)]
core: There is no user of automatic connections timeout

11 years agocore: The adapter->off_requested is no longer used
Marcel Holtmann [Sat, 5 Jan 2013 09:15:00 +0000 (01:15 -0800)]
core: The adapter->off_requested is no longer used

11 years agocore: Remove leftover from pending_uuids removal
Anderson Lizardo [Sat, 5 Jan 2013 02:15:34 +0000 (22:15 -0400)]
core: Remove leftover from pending_uuids removal

The struct controller_info "pending_uuids" field was removed on commit
1dd77eda25aae5ed963683dfc125d3ef01187eba.

11 years agocore: Remove double tracking of existing connections
Marcel Holtmann [Sat, 5 Jan 2013 08:29:06 +0000 (00:29 -0800)]
core: Remove double tracking of existing connections

11 years agocore: Read the current existing connections from adapter handling
Marcel Holtmann [Sat, 5 Jan 2013 08:27:18 +0000 (00:27 -0800)]
core: Read the current existing connections from adapter handling

11 years agocore: Don't pretend there is a management command for reading the clock
Marcel Holtmann [Sat, 5 Jan 2013 08:13:05 +0000 (00:13 -0800)]
core: Don't pretend there is a management command for reading the clock

11 years agocore: There is no need to track the supported settings twice
Marcel Holtmann [Sat, 5 Jan 2013 08:10:41 +0000 (00:10 -0800)]
core: There is no need to track the supported settings twice

11 years agocore: Remove now unused mode handling functions
Marcel Holtmann [Sat, 5 Jan 2013 08:09:22 +0000 (00:09 -0800)]
core: Remove now unused mode handling functions

11 years agocore: Make sure to enable SSP and LE if supported
Marcel Holtmann [Sat, 5 Jan 2013 08:08:44 +0000 (00:08 -0800)]
core: Make sure to enable SSP and LE if supported

11 years agocore: Use adapter settings directly to determine if SSP is enabled
Marcel Holtmann [Sat, 5 Jan 2013 08:02:41 +0000 (00:02 -0800)]
core: Use adapter settings directly to determine if SSP is enabled

11 years agocore: Remove need for adapter_update_settings function
Marcel Holtmann [Sat, 5 Jan 2013 07:58:34 +0000 (23:58 -0800)]
core: Remove need for adapter_update_settings function

11 years agocore: Remove old callbacks for settings update
Marcel Holtmann [Sat, 5 Jan 2013 06:51:10 +0000 (22:51 -0800)]
core: Remove old callbacks for settings update

11 years agocore: Remove old function for setting connectable and discoverable
Marcel Holtmann [Sat, 5 Jan 2013 06:44:56 +0000 (22:44 -0800)]
core: Remove old function for setting connectable and discoverable

11 years agocore: Add support for handling internal mode changes
Marcel Holtmann [Sat, 5 Jan 2013 06:22:51 +0000 (22:22 -0800)]
core: Add support for handling internal mode changes

11 years agocore: Remove old function for setting controller pairable
Marcel Holtmann [Sat, 5 Jan 2013 04:55:09 +0000 (20:55 -0800)]
core: Remove old function for setting controller pairable

11 years agocore: Add place holder for disabling pairable setting
Marcel Holtmann [Sat, 5 Jan 2013 04:53:39 +0000 (20:53 -0800)]
core: Add place holder for disabling pairable setting

11 years agocore: Add support for pairable property within adapter handling
Marcel Holtmann [Sat, 5 Jan 2013 04:51:33 +0000 (20:51 -0800)]
core: Add support for pairable property within adapter handling

11 years agocore: Remove old function for setting controller power
Marcel Holtmann [Sat, 5 Jan 2013 04:35:22 +0000 (20:35 -0800)]
core: Remove old function for setting controller power

11 years agocore: Add two place holders for controller power on/off
Marcel Holtmann [Sat, 5 Jan 2013 04:34:07 +0000 (20:34 -0800)]
core: Add two place holders for controller power on/off

11 years agocore: Add support for powered property within adapter handling
Marcel Holtmann [Sat, 5 Jan 2013 04:29:50 +0000 (20:29 -0800)]
core: Add support for powered property within adapter handling

11 years agogdbus: Check signature of property value before calling setter
Marcel Holtmann [Sat, 5 Jan 2013 04:28:07 +0000 (20:28 -0800)]
gdbus: Check signature of property value before calling setter

11 years agocore: Store global D-Bus connection for adapter handling
Marcel Holtmann [Sat, 5 Jan 2013 04:27:22 +0000 (20:27 -0800)]
core: Store global D-Bus connection for adapter handling

11 years agocore: Make adapter_class_changed function private
Marcel Holtmann [Fri, 4 Jan 2013 22:53:26 +0000 (14:53 -0800)]
core: Make adapter_class_changed function private

11 years agocore: Read the list of supported management commands
Marcel Holtmann [Fri, 4 Jan 2013 22:49:09 +0000 (14:49 -0800)]
core: Read the list of supported management commands

11 years agocore: Read management interface version only once
Marcel Holtmann [Fri, 4 Jan 2013 22:40:38 +0000 (14:40 -0800)]
core: Read management interface version only once

11 years agocore: Use index for tracking controller info and not its address
Marcel Holtmann [Fri, 4 Jan 2013 22:36:01 +0000 (14:36 -0800)]
core: Use index for tracking controller info and not its address

11 years agocore: Use the index to find the device structure
Marcel Holtmann [Fri, 4 Jan 2013 22:33:08 +0000 (14:33 -0800)]
core: Use the index to find the device structure

11 years agocore: Use the index to find the adapter structure
Marcel Holtmann [Fri, 4 Jan 2013 22:19:43 +0000 (14:19 -0800)]
core: Use the index to find the adapter structure

11 years agocore: Clear UUID list before registering adapter
Marcel Holtmann [Fri, 4 Jan 2013 22:10:07 +0000 (14:10 -0800)]
core: Clear UUID list before registering adapter

11 years agocore: Add support for enabling management debug traces
Marcel Holtmann [Fri, 4 Jan 2013 22:08:00 +0000 (14:08 -0800)]
core: Add support for enabling management debug traces

11 years agocore: Remove all leftovers from working around a command busy issue
Marcel Holtmann [Fri, 4 Jan 2013 22:02:06 +0000 (14:02 -0800)]
core: Remove all leftovers from working around a command busy issue

11 years agocore: Remove old function for triggering UUID additions
Marcel Holtmann [Fri, 4 Jan 2013 21:58:18 +0000 (13:58 -0800)]
core: Remove old function for triggering UUID additions

11 years agocore: Handle adding of UUIDs within the adapter support
Marcel Holtmann [Fri, 4 Jan 2013 21:57:56 +0000 (13:57 -0800)]
core: Handle adding of UUIDs within the adapter support

11 years agocore: Move code around to place it logical together
Marcel Holtmann [Fri, 4 Jan 2013 21:48:01 +0000 (13:48 -0800)]
core: Move code around to place it logical together

11 years agocore: Remove old function for triggering UUID removal
Marcel Holtmann [Fri, 4 Jan 2013 21:44:37 +0000 (13:44 -0800)]
core: Remove old function for triggering UUID removal

11 years agocore: Handle removing of UUIDs within the adapter support
Marcel Holtmann [Fri, 4 Jan 2013 21:43:19 +0000 (13:43 -0800)]
core: Handle removing of UUIDs within the adapter support

11 years agocore: Add a few more debug prints for management command sending
Marcel Holtmann [Fri, 4 Jan 2013 21:12:42 +0000 (13:12 -0800)]
core: Add a few more debug prints for management command sending

11 years agocore: Remove old handler for new settings notifications
Marcel Holtmann [Fri, 4 Jan 2013 21:06:09 +0000 (13:06 -0800)]
core: Remove old handler for new settings notifications

11 years agocore: Add support for handling new settings notifications
Marcel Holtmann [Fri, 4 Jan 2013 21:04:55 +0000 (13:04 -0800)]
core: Add support for handling new settings notifications

11 years agocore: Remove old handler for class of device changed notifications
Marcel Holtmann [Fri, 4 Jan 2013 20:55:09 +0000 (12:55 -0800)]
core: Remove old handler for class of device changed notifications

11 years agocore: Handle class of device changed notifications
Marcel Holtmann [Fri, 4 Jan 2013 20:54:28 +0000 (12:54 -0800)]
core: Handle class of device changed notifications

11 years agocore: Make adapter_name_changed function private
Marcel Holtmann [Fri, 4 Jan 2013 20:43:53 +0000 (12:43 -0800)]
core: Make adapter_name_changed function private

11 years agocore: Remove old handler for local name changed notifications
Marcel Holtmann [Fri, 4 Jan 2013 20:42:51 +0000 (12:42 -0800)]
core: Remove old handler for local name changed notifications

11 years agocore: Handle local name changed notifications
Marcel Holtmann [Fri, 4 Jan 2013 20:42:15 +0000 (12:42 -0800)]
core: Handle local name changed notifications

11 years agoobexd: Remove the total silly usage of gchar and replace it with char
Marcel Holtmann [Fri, 4 Jan 2013 20:27:55 +0000 (12:27 -0800)]
obexd: Remove the total silly usage of gchar and replace it with char

11 years agotools: Remove the total silly usage of gchar and replace it with char
Marcel Holtmann [Fri, 4 Jan 2013 20:27:47 +0000 (12:27 -0800)]
tools: Remove the total silly usage of gchar and replace it with char

11 years agoplugins: Remove the total silly usage of gchar and replace it with char
Marcel Holtmann [Fri, 4 Jan 2013 20:24:09 +0000 (12:24 -0800)]
plugins: Remove the total silly usage of gchar and replace it with char

11 years agoprofiles: Remove the total silly usage of gchar and replace it with char
Marcel Holtmann [Fri, 4 Jan 2013 20:23:54 +0000 (12:23 -0800)]
profiles: Remove the total silly usage of gchar and replace it with char

11 years agocore: Remove the total silly usage of gchar and replace it with just char
Marcel Holtmann [Fri, 4 Jan 2013 20:20:10 +0000 (12:20 -0800)]
core: Remove the total silly usage of gchar and replace it with just char

11 years agocore: Remove stupid adapter path string duplication
Marcel Holtmann [Fri, 4 Jan 2013 20:06:42 +0000 (12:06 -0800)]
core: Remove stupid adapter path string duplication

Duplicating the path string before calling g_dbus_unregister_interface
is silly. If this is really needed, then there is a bug in the way how
the D-Bus interface unregistration is handled.

If this causes a bug to show up, then lets fix it at the root of it and
not keep working around it.

11 years agocore: Reference counts are signed integers
Marcel Holtmann [Fri, 4 Jan 2013 20:03:06 +0000 (12:03 -0800)]
core: Reference counts are signed integers

11 years agocore: Remove pointless temporary adapter path variable
Marcel Holtmann [Fri, 4 Jan 2013 19:55:00 +0000 (11:55 -0800)]
core: Remove pointless temporary adapter path variable

11 years agocore: Remove global variable for adapter base path
Marcel Holtmann [Fri, 4 Jan 2013 19:52:17 +0000 (11:52 -0800)]
core: Remove global variable for adapter base path

11 years agocore: Update a few more error messages around adapter handling
Marcel Holtmann [Fri, 4 Jan 2013 19:48:41 +0000 (11:48 -0800)]
core: Update a few more error messages around adapter handling

11 years agocore: Update error for management init failures
Marcel Holtmann [Fri, 4 Jan 2013 19:42:29 +0000 (11:42 -0800)]
core: Update error for management init failures

11 years agocore: Change error prints for set device class complete callback
Marcel Holtmann [Fri, 4 Jan 2013 19:38:22 +0000 (11:38 -0800)]
core: Change error prints for set device class complete callback

11 years agocore: Remove old command complete handler for set device class
Marcel Holtmann [Fri, 4 Jan 2013 19:35:20 +0000 (11:35 -0800)]
core: Remove old command complete handler for set device class

11 years agocore: Remove old command complete handler for set local name
Marcel Holtmann [Fri, 4 Jan 2013 19:33:57 +0000 (11:33 -0800)]
core: Remove old command complete handler for set local name

11 years agocore: Handle result callback for setting local name
Marcel Holtmann [Fri, 4 Jan 2013 19:32:23 +0000 (11:32 -0800)]
core: Handle result callback for setting local name

11 years agocore: Be safe and cancel all pending global commands
Marcel Holtmann [Fri, 4 Jan 2013 19:23:41 +0000 (11:23 -0800)]
core: Be safe and cancel all pending global commands

11 years agocore: Fix memory leaks and management error handling
Marcel Holtmann [Fri, 4 Jan 2013 19:20:07 +0000 (11:20 -0800)]
core: Fix memory leaks and management error handling

11 years agocore: Cancel all pending commands for the index on adapter removal
Marcel Holtmann [Fri, 4 Jan 2013 19:06:41 +0000 (11:06 -0800)]
core: Cancel all pending commands for the index on adapter removal

11 years agoshared: Add support for canceling all management request of one index
Marcel Holtmann [Fri, 4 Jan 2013 19:04:43 +0000 (11:04 -0800)]
shared: Add support for canceling all management request of one index

11 years agocore: Unregister all handlers for the index on adapter removal
Marcel Holtmann [Fri, 4 Jan 2013 18:54:10 +0000 (10:54 -0800)]
core: Unregister all handlers for the index on adapter removal

11 years agocore: Separate between master mgmt and adapter mgmt references
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.

11 years agocore: Make the mgmt struct and version/revision variables private
Marcel Holtmann [Fri, 4 Jan 2013 18:39:50 +0000 (10:39 -0800)]
core: Make the mgmt struct and version/revision variables private

11 years agocore: Be safe and unregister index added/removed handlers
Marcel Holtmann [Fri, 4 Jan 2013 18:39:02 +0000 (10:39 -0800)]
core: Be safe and unregister index added/removed handlers

11 years agocore: Fix calling of adapter_update_settings for powered changes
Johan Hedberg [Fri, 4 Jan 2013 18:03:19 +0000 (20:03 +0200)]
core: Fix calling of adapter_update_settings for powered changes

11 years agocore: Fix up adapter ref count name and type
Johan Hedberg [Fri, 4 Jan 2013 16:58:11 +0000 (18:58 +0200)]
core: Fix up adapter ref count name and type

11 years agocore: Create an adapter already in index_added/read_index_list
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.

11 years agoRevert "tools: Update mgmt-tester to use the new mgmt_send API"
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.

11 years agoRevert "core: Add index parameter to mgmt_request_func_t callback"
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.

11 years agounit: Fix compilation issue with ignored return value
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]

11 years agorfkill: Fix count parameter in read
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

11 years agostorage: Fix memory leak
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

11 years agocore: Use mgmt settings to track adapter state
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.