OSDN Git Service

android-x86/external-bluetooth-bluez.git
13 years agoFix g_attrib_send() to include a new ID parameter
Brian Gix [Fri, 7 Jan 2011 00:39:42 +0000 (16:39 -0800)]
Fix g_attrib_send() to include a new ID parameter

Overall purpose of change is to enable a GATT procedure to be
executed atomically, even if it requires multiple ATT
request/response transactions.

Fix g_attrib_send() to include an ID parameter, if the pkt to
be sent should be added to the Head of the pkt queue.  If the
ID is Zero, legacy functionality is maintained, and the pkt will
be added at the tail of the queuer, and a new ID will be generated,
and returned to the caller. If ID is non-zero, the pkt will be
added to the head of the queue, with the ID value requested, which
will also be returned to the caller.

Fix received_data() to not service the send queue until after the
received data has been processed by calling the cmd->func()
callback, to allow the callback to insert another pkt on the head
of the queue.

Fix all callers of g_attrib_send() to include new parameter.

13 years agotelephony-ofono: fix not updating indicators when a call is removed
Luiz Augusto von Dentz [Wed, 5 Jan 2011 15:59:47 +0000 (17:59 +0200)]
telephony-ofono: fix not updating indicators when a call is removed

In some extreme cases such as modem removal ofono may not have a chance
to set the call to disconnected state so indicators would not be update
properly.

13 years agotelephony-ofono: add handling for Modem.Interfaces property
Luiz Augusto von Dentz [Wed, 5 Jan 2011 15:59:46 +0000 (17:59 +0200)]
telephony-ofono: add handling for Modem.Interfaces property

This should make sure a modem is only used if a network is available

13 years agotelephony-ofono: handle ofono appearing/disappearing from bus
Luiz Augusto von Dentz [Wed, 5 Jan 2011 15:59:45 +0000 (17:59 +0200)]
telephony-ofono: handle ofono appearing/disappearing from bus

13 years agotelephony-ofono: simplify watches handling logic
Luiz Augusto von Dentz [Wed, 5 Jan 2011 15:59:44 +0000 (17:59 +0200)]
telephony-ofono: simplify watches handling logic

13 years agotelephony-ofono: fix not canceling pending calls on exit
Luiz Augusto von Dentz [Wed, 5 Jan 2011 15:59:43 +0000 (17:59 +0200)]
telephony-ofono: fix not canceling pending calls on exit

13 years agotelephony-ofono: make use of GetCalls method
Luiz Augusto von Dentz [Wed, 5 Jan 2011 15:59:42 +0000 (17:59 +0200)]
telephony-ofono: make use of GetCalls method

13 years agotelephony-ofono: make use of GetModems method
Luiz Augusto von Dentz [Wed, 5 Jan 2011 15:59:41 +0000 (17:59 +0200)]
telephony-ofono: make use of GetModems method

Ofono API has changed, modem list is no longer a property

13 years agotelephony-ofono: fix not setting originating when status property changes
Luiz Augusto von Dentz [Wed, 5 Jan 2011 15:59:40 +0000 (17:59 +0200)]
telephony-ofono: fix not setting originating when status property changes

13 years agotelephony-ofono: fix not being able to answer alerting/waiting calls
Luiz Augusto von Dentz [Wed, 5 Jan 2011 15:59:39 +0000 (17:59 +0200)]
telephony-ofono: fix not being able to answer alerting/waiting calls

13 years agotelephony-ofono: notify alerting calls when headset connects
Luiz Augusto von Dentz [Wed, 5 Jan 2011 15:59:38 +0000 (17:59 +0200)]
telephony-ofono: notify alerting calls when headset connects

13 years agoTODO: Start Discover All Primary Services after SDP if necessary
Claudio Takahasi [Mon, 3 Jan 2011 21:45:54 +0000 (18:45 -0300)]
TODO: Start Discover All Primary Services after SDP if necessary

13 years agoTODO: Refactoring of gatt.c functions
Claudio Takahasi [Mon, 3 Jan 2011 21:45:53 +0000 (18:45 -0300)]
TODO: Refactoring of gatt.c functions

13 years agoTODO: Rename glib-helper file to a more convenient name
Claudio Takahasi [Mon, 3 Jan 2011 21:45:52 +0000 (18:45 -0300)]
TODO: Rename glib-helper file to a more convenient name

13 years agoTODO: Remove characteristic discovery for non connectable devices
Claudio Takahasi [Mon, 3 Jan 2011 21:45:51 +0000 (18:45 -0300)]
TODO: Remove characteristic discovery for non connectable devices

CreateDevice and CreatePairedDevice methods already check the event
type and AD Flags before to connect to discover all primary services.
Characteristic discovery will not be available since D-Bus method
is not exposed to Broadcaster devices.

13 years agoTODO: Setup advertising parameters and data
Claudio Takahasi [Mon, 3 Jan 2011 21:45:50 +0000 (18:45 -0300)]
TODO: Setup advertising parameters and data

13 years agoChange security level on demand when reading characteristic descriptor
Claudio Takahasi [Thu, 30 Dec 2010 21:22:10 +0000 (18:22 -0300)]
Change security level on demand when reading characteristic descriptor

13 years agoChange security level on demand when reading characteristic value
Claudio Takahasi [Thu, 30 Dec 2010 21:22:09 +0000 (18:22 -0300)]
Change security level on demand when reading characteristic value

If a characteristic requires a higher security level, change it on
demand and re-send the GATT Charateristic Value Read. Request will not
be sent until the SMP negotiation finishes. This change doesn't affect
GATT over BR/EDR, since encryption is mandatory for BR/EDR.

13 years agomgmt: Fix opcode endianess in commands
Johan Hedberg [Mon, 3 Jan 2011 20:57:44 +0000 (22:57 +0200)]
mgmt: Fix opcode endianess in commands

13 years agomgmt: Add preliminary UUID handling
Johan Hedberg [Mon, 3 Jan 2011 20:17:32 +0000 (22:17 +0200)]
mgmt: Add preliminary UUID handling

This patch adds support for the add_uuid and remove_uuid management
commands. The kernel uses them to track the list of UUIDs and
automatically set the service class bits as well as the EIR value
accordingly.

13 years agogdbus: Update copyright information
Marcel Holtmann [Sun, 2 Jan 2011 01:31:09 +0000 (17:31 -0800)]
gdbus: Update copyright information

13 years agomgmt: Implement set_pairable
Johan Hedberg [Thu, 30 Dec 2010 13:03:57 +0000 (15:03 +0200)]
mgmt: Implement set_pairable

This patch implements support for the set_pairable managment command.
Due to the async nature of it a new btd_adapter_pairable_changed
function is added to the core daemon.

13 years agoRefactor handling of UUIDs with respect to adapter_ops
Johan Hedberg [Thu, 30 Dec 2010 10:20:43 +0000 (12:20 +0200)]
Refactor handling of UUIDs with respect to adapter_ops

The management interface will have simple add_uuid and remove_uuid
methods so it makes sense to have the adapter_ops interface reflect
that. This patch removes the services_updated callback and replaces it
with add_uuid and remove_uuid callbacks.

13 years agoRename mgmt_update_mode to mgmt_update_powered for clarity
Johan Hedberg [Wed, 29 Dec 2010 22:13:25 +0000 (00:13 +0200)]
Rename mgmt_update_mode to mgmt_update_powered for clarity

13 years agomgmt: Use a common structure for powered, discoverable and connectable
Johan Hedberg [Wed, 29 Dec 2010 22:10:26 +0000 (00:10 +0200)]
mgmt: Use a common structure for powered, discoverable and connectable

The events, commands and responses to these modes are represented by
identical management messages. By having a unified struct for all of
them quite a lot of code can simplified and reused.

13 years agomgmt: Clean up scan mode evaluation code
Johan Hedberg [Wed, 29 Dec 2010 21:43:06 +0000 (23:43 +0200)]
mgmt: Clean up scan mode evaluation code

13 years agoUpdate mgmt-api.txt to match latest implementation
Johan Hedberg [Wed, 29 Dec 2010 21:35:54 +0000 (23:35 +0200)]
Update mgmt-api.txt to match latest implementation

13 years agomgmt: Implement set_connectable
Johan Hedberg [Wed, 29 Dec 2010 21:30:35 +0000 (23:30 +0200)]
mgmt: Implement set_connectable

13 years agomgmt: Implement set_discoverable
Johan Hedberg [Wed, 29 Dec 2010 12:38:57 +0000 (14:38 +0200)]
mgmt: Implement set_discoverable

13 years agomgmt: Implement set_powered
Johan Hedberg [Wed, 29 Dec 2010 10:43:02 +0000 (12:43 +0200)]
mgmt: Implement set_powered

13 years agoKeep found LE device list to use when creating a device
Claudio Takahasi [Wed, 29 Dec 2010 21:25:22 +0000 (18:25 -0300)]
Keep found LE device list to use when creating a device

Found devices list should be used to identify device types when
CreateDevice or CreatePairedDevice are called. During the device
creation the selected device will be classified as LE device if it
belongs to the device found list and if the Flags AD type matches the
GAP requirements. BR/EDR devices don't need to be tracked since the
default remote device type is Basic Rate.

13 years agoAdd LE read supported states for hciconfig
Claudio Takahasi [Wed, 29 Dec 2010 21:17:24 +0000 (18:17 -0300)]
Add LE read supported states for hciconfig

Displays the states and state combinations that the link layer
supports. Usage: hciconfig hcix lestates

13 years agoSimplify btd_event_conn_complete logic
Johan Hedberg [Wed, 29 Dec 2010 13:43:09 +0000 (15:43 +0200)]
Simplify btd_event_conn_complete logic

13 years agoDon't force device creation for pairing failure events
Johan Hedberg [Wed, 29 Dec 2010 13:40:08 +0000 (15:40 +0200)]
Don't force device creation for pairing failure events

A pairing failure could be caused by switching Bluetooth off or a
disconnect forced by cancelling the pairing attempt so it doesn't make
sense to re-create a device object in these cases.

13 years agoRemove unneeded set_connectable adapter_ops callback
Johan Hedberg [Wed, 29 Dec 2010 11:33:29 +0000 (13:33 +0200)]
Remove unneeded set_connectable adapter_ops callback

13 years agoRelease 4.84
Marcel Holtmann [Tue, 28 Dec 2010 18:56:56 +0000 (10:56 -0800)]
Release 4.84

13 years agoFix leak of EIR data if RSSI does not change
Anderson Lizardo [Tue, 28 Dec 2010 18:10:20 +0000 (14:10 -0400)]
Fix leak of EIR data if RSSI does not change

If RSSI value does not change, memory used by parsed EIR data would leak
because it would not be assigned to the remote_dev_info structure.

13 years agoFix crash due to misplaced parameter in emit_device_found() call
Anderson Lizardo [Tue, 28 Dec 2010 16:52:30 +0000 (12:52 -0400)]
Fix crash due to misplaced parameter in emit_device_found() call

To avoid related mistakes, dev->uuid_count was shortened to uuid_count
and kept on the same line.

13 years agoRename btd_adapter_get_state to btd_adapter_get_mode
Johan Hedberg [Tue, 28 Dec 2010 09:35:35 +0000 (11:35 +0200)]
Rename btd_adapter_get_state to btd_adapter_get_mode

There's already an adapter_get_state function so to avoid confusion it's
better to have a different name.

13 years agoRemove unused variable
Johan Hedberg [Tue, 28 Dec 2010 09:16:38 +0000 (11:16 +0200)]
Remove unused variable

13 years agoFix adapter state when InitiallyPowered=false and RememberPowered=false
Johan Hedberg [Tue, 28 Dec 2010 09:00:39 +0000 (11:00 +0200)]
Fix adapter state when InitiallyPowered=false and RememberPowered=false

This patch reintroduces the adapter->initialized flag since it's
actually needed to make sure we only apply the InitiallyPowered setting
for the very first time when initializing an adapter.

13 years agoRemove outdated comments
Anderson Lizardo [Mon, 27 Dec 2010 13:21:07 +0000 (09:21 -0400)]
Remove outdated comments

13 years agoRemove ancient NAME_SENT name resolution status
Anderson Lizardo [Mon, 27 Dec 2010 13:21:05 +0000 (09:21 -0400)]
Remove ancient NAME_SENT name resolution status

The NAME_SENT status was introduced on commit
d6a16516a9f6deae8342f00e8186b02d0019a1e1, when there was a
"RemoteNameUpdate" D-Bus signal. Nowadays, there is no such signal, and
the device name (if any) is always sent on "DeviceFound" signal.

13 years agoFix printing D-Bus errors when headset record could not be found
Luiz Augusto von Dentz [Mon, 27 Dec 2010 12:27:21 +0000 (14:27 +0200)]
Fix printing D-Bus errors when headset record could not be found

When connection is started via headset_config_stream there is no D-Bus
message to reply to.

13 years agoAdd debug print for tracking adapter_mode_changed calls
Johan Hedberg [Mon, 27 Dec 2010 07:47:17 +0000 (09:47 +0200)]
Add debug print for tracking adapter_mode_changed calls

13 years agoFix closing of SDP server sockets
Johan Hedberg [Mon, 27 Dec 2010 06:48:53 +0000 (08:48 +0200)]
Fix closing of SDP server sockets

The existing code relied on set_close_on_unref which doesn't work as
long as the io watch callbacks hold on to their own reference. To fix
this it's better to track the watch id's instead of the IO channels and
do g_source_remove instead of g_io_channel_unref.

This isn't a particularly critical fd leak since these are created once
on bluetoothd startup and closed on exit, however they do help clean up
the valgrind fd-leak report.

13 years agoRelease 4.83
Marcel Holtmann [Sun, 26 Dec 2010 19:20:39 +0000 (11:20 -0800)]
Release 4.83

13 years agoAdd Broadcaster property in DeviceFound signal
Sheldon Demario [Thu, 23 Dec 2010 21:33:07 +0000 (16:33 -0500)]
Add Broadcaster property in DeviceFound signal

Broadcaster property is required to distinguish the device role. If the
remote is sending an advertising event, two possible roles are possible:
Peripheral or Broadcaster.

This change is required to pass on qualification tests which require
filtering Broadcasting devices during General Discovery Procedure.

13 years agoChange CreatePairedDevice to support LE devices
Sheldon Demario [Thu, 23 Dec 2010 21:29:50 +0000 (16:29 -0500)]
Change CreatePairedDevice to support LE devices

CreatePairedDevice implements now the same behaviour of CreateDevice,
triggering Discover All Primary Services when needed. SMP negotiation
starts when the link is established. LE capable kernel is required to
test this method properly.

Limitation: For dual mode devices, Discover All Primary Services is not
being executed after SDP search if GATT record is found.

13 years agoFix spurious DeviceDisappeared signals after name resolution
Anderson Lizardo [Thu, 23 Dec 2010 17:39:25 +0000 (13:39 -0400)]
Fix spurious DeviceDisappeared signals after name resolution

update_oor_devices() was being called twice, first after a inquiry, then
after name resolution. This caused the just found devices to be always
reported as "disappeared" after name resolution.

13 years agoChange power_on & power_off adapter_ops callbacks to set_powered
Johan Hedberg [Thu, 23 Dec 2010 12:38:52 +0000 (14:38 +0200)]
Change power_on & power_off adapter_ops callbacks to set_powered

The current idea is to have a single set_powered management command
which for the switching on case would leave the controller in a
non-connectable, non-pairable and non-discoverable state.

13 years agoAdd a "services" command to test-device
Vinicius Costa Gomes [Tue, 21 Dec 2010 21:26:40 +0000 (19:26 -0200)]
Add a "services" command to test-device

This command adds a way to retrieve the Services property that each
device has.

13 years agoAdd GetProperties method the Service Interface
Vinicius Costa Gomes [Tue, 21 Dec 2010 21:26:39 +0000 (19:26 -0200)]
Add GetProperties method the Service Interface

For now this interface just includes the path that each characteristic
is registered at.

13 years agoAdd support for adding services to the Services property
Vinicius Costa Gomes [Tue, 21 Dec 2010 21:26:38 +0000 (19:26 -0200)]
Add support for adding services to the Services property

We need to fill the devices property as each service path gets
registered in the DBus system bus.

13 years agoRemove GetCharacteristics DBus method
Vinicius Costa Gomes [Tue, 21 Dec 2010 21:26:37 +0000 (19:26 -0200)]
Remove GetCharacteristics DBus method

This method was not documented in the API, and it has the same
functionality as getting the Characteristics property.

13 years agoAdd a Discover method to the GATT Client
Vinicius Costa Gomes [Tue, 21 Dec 2010 21:26:36 +0000 (19:26 -0200)]
Add a Discover method to the GATT Client

This methods allows users to actively start the discovery of characteristics
presents in a service.

13 years agoAdd support for making LE connections to GATT client
Vinicius Costa Gomes [Tue, 21 Dec 2010 21:26:35 +0000 (19:26 -0200)]
Add support for making LE connections to GATT client

Now GATT client should be able to make LE connections. The information
used to determine if we should make a LE connection is the psm stored
in the gatt_service structure.

13 years agoClean up the primary service D-Bus registration
Vinicius Costa Gomes [Tue, 21 Dec 2010 21:26:34 +0000 (19:26 -0200)]
Clean up the primary service D-Bus registration

Now, that much of this funcionality was moved to the core, we can go
straight to the registration of D-Bus interfaces.

13 years agoRemove duplicated code for discovering GATT services
Vinicius Costa Gomes [Tue, 21 Dec 2010 21:26:33 +0000 (19:26 -0200)]
Remove duplicated code for discovering GATT services

Most of this functionality was moved to src/device.c. Since that move
this code doesn't work. Some ugly hack were added to avoid breaking
the build.

13 years agoAdd the btd_ prefix to device_add_service
Vinicius Costa Gomes [Tue, 21 Dec 2010 21:26:32 +0000 (19:26 -0200)]
Add the btd_ prefix to device_add_service

This is needed to keep consistency, as device_add_service would be used
from outside the core bluetoothd.

13 years agoRemove GATT information when the device is removed
Vinicius Costa Gomes [Tue, 21 Dec 2010 21:26:31 +0000 (19:26 -0200)]
Remove GATT information when the device is removed

This adds a way to remove the information about the device type and its
primary services when the device is going to be removed from the permanent
storage.

13 years agoAdd a way to retrieve ATT primary services
Vinicius Costa Gomes [Thu, 23 Dec 2010 00:21:13 +0000 (22:21 -0200)]
Add a way to retrieve ATT primary services

As the primary services were discovered by the core bluetoothd, we need
a way to export that information.

The service discovery uses the same primary list as the device, there's no
need to free that list when the discovery finishes. That list will be removed
when the device is free'd.

13 years agoAdd support for creating devices from stored primary services
Vinicius Costa Gomes [Thu, 23 Dec 2010 00:16:37 +0000 (22:16 -0200)]
Add support for creating devices from stored primary services

From what we can retrieve from storage we are able to create the devices
and probe the device drivers.

13 years agoAdd support for creating devices from stored types
Vinicius Costa Gomes [Tue, 21 Dec 2010 21:26:28 +0000 (19:26 -0200)]
Add support for creating devices from stored types

This adds a way to restore devices from their types.

13 years agoAdd support for storing the device type
Vinicius Costa Gomes [Tue, 21 Dec 2010 21:26:27 +0000 (19:26 -0200)]
Add support for storing the device type

When the service discovery (SDP or GATT) is finished, write the device
type so it can be retrieved from storage when needed.

13 years agosbc: detect when bitpool has changed
Luiz Augusto von Dentz [Wed, 22 Dec 2010 09:35:48 +0000 (11:35 +0200)]
sbc: detect when bitpool has changed

A2DP spec allow bitpool changes midstream which is why sbc configuration
has a range of values for bitpool that the encoder can use and decoder
must support.

Bitpool changes do not affect the state of encoder/decoder so they don't
need to be reinitialize when this happens, so the impact is fairly small,
what it does change is the frame length so encoders may change the
bitpool to use the link more efficiently.

13 years agoChange LE scan interval and window to recommended values
Bruna Moreira [Wed, 22 Dec 2010 19:11:48 +0000 (15:11 -0400)]
Change LE scan interval and window to recommended values

Replace default scan interval and scan window values with recommended
ones for general discovery procedure, according to the Core
specification.

13 years agoMove primary service storage to device.c
Sheldon Demario [Wed, 22 Dec 2010 22:01:13 +0000 (17:01 -0500)]
Move primary service storage to device.c

Discover All Primary Services has beed moved to device.c in order
to follow a similar approach of BR/EDR service records.

13 years agoAdd a way to store the remote device type
Vinicius Costa Gomes [Tue, 21 Dec 2010 21:26:26 +0000 (19:26 -0200)]
Add a way to store the remote device type

Because we need to know the device type (LE, Basic Rate or Dual Mode)
to be able to fully restore the device from storage, we have to store
and load this information to permanent storage.

Note: due to "device_type_t" usage in storage.h, some header includes
needed to be reordered in files which include storage.h.

13 years agoFix memory leaks in the attrib-server
Vinicius Costa Gomes [Tue, 21 Dec 2010 21:26:24 +0000 (19:26 -0200)]
Fix memory leaks in the attrib-server

13 years agoFix attrib plugin deregistration
Vinicius Costa Gomes [Tue, 21 Dec 2010 21:26:23 +0000 (19:26 -0200)]
Fix attrib plugin deregistration

As the comparison method used for find what to de-register was
wrong, it was causing the btd_device reference that the attrib
plugin was keeping never to be dropped.

13 years agoConfigure HFP/HSP endpoints if headset interface is already connected
Luiz Augusto von Dentz [Tue, 21 Dec 2010 15:43:15 +0000 (17:43 +0200)]
Configure HFP/HSP endpoints if headset interface is already connected

HFP/HSP can be connected when registering an endpoint which is different
than on a2dp where the sep cannot be configured already since it wasn't
available before.

13 years agoRemove unneeded variables from link_key_request()
Johan Hedberg [Tue, 21 Dec 2010 13:01:04 +0000 (15:01 +0200)]
Remove unneeded variables from link_key_request()

13 years agoRemove unneeded variable
Claudio Takahasi [Tue, 21 Dec 2010 12:02:48 +0000 (08:02 -0400)]
Remove unneeded variable

13 years agoAdd disconnect command to test-device
Johan Hedberg [Tue, 21 Dec 2010 09:22:57 +0000 (11:22 +0200)]
Add disconnect command to test-device

13 years agoCoding style fixes for lib and tools
Michal Labedzki [Tue, 21 Dec 2010 08:34:49 +0000 (09:34 +0100)]
Coding style fixes for lib and tools

13 years agoRemove bt_discover_services function from glib-helper
Sheldon Demario [Mon, 20 Dec 2010 23:06:02 +0000 (18:06 -0500)]
Remove bt_discover_services function from glib-helper

There is no reference in the code for this function. SDP discovery in
the bluetoothd core and plugins are now using bt_search_service only.

13 years agoFix missing reply when create device is cancelled
Claudio Takahasi [Mon, 20 Dec 2010 22:47:35 +0000 (19:47 -0300)]
Fix missing reply when create device is cancelled

When CancelDeviceCreation is called or when the device is removed for
any reason, the reply for the pending CreateDevice is not sent.

13 years agoRemove le_advertising_info struct from adapter.c
Bruna Moreira [Mon, 20 Dec 2010 18:16:45 +0000 (14:16 -0400)]
Remove le_advertising_info struct from adapter.c

13 years agoMove EIR flags definitions to adapter.c
Bruna Moreira [Mon, 20 Dec 2010 18:16:44 +0000 (14:16 -0400)]
Move EIR flags definitions to adapter.c

13 years agoRemove unused variables from link_key_request()
Johan Hedberg [Mon, 20 Dec 2010 19:16:02 +0000 (21:16 +0200)]
Remove unused variables from link_key_request()

13 years agoMove debug key handling into adapter_ops
Johan Hedberg [Mon, 20 Dec 2010 17:38:43 +0000 (19:38 +0200)]
Move debug key handling into adapter_ops

There's no need for the core daemon to have special handling for debug
keys anymore as long as it tells adapter_ops if they are enabled or not
(new parameter added to adapter_ops->load_keys).

13 years agoAdd initial code for mgmtops adapter power control
Johan Hedberg [Mon, 20 Dec 2010 17:14:07 +0000 (19:14 +0200)]
Add initial code for mgmtops adapter power control

13 years agoFix tools UI to avoid program launch mistakes.
Michal Labedzki [Mon, 20 Dec 2010 10:13:48 +0000 (11:13 +0100)]
Fix tools UI to avoid program launch mistakes.

hciconfig: warrning user on unknown commands
hcitool: return error on unknown command in hcitool
fix length size in comparision to avoid ambiguity commands
check if command number of arguments is correct

13 years agoFix memory leak of unused EIR name
Anderson Lizardo [Mon, 20 Dec 2010 15:32:19 +0000 (11:32 -0400)]
Fix memory leak of unused EIR name

There is a code path in btd_event_device_found() where the EIR name is
not used. This requires freeing eir_data.name to avoid a leak.

13 years agoFix compilation error in read_simple_pairing_mode_complete
Johan Hedberg [Mon, 20 Dec 2010 11:45:09 +0000 (13:45 +0200)]
Fix compilation error in read_simple_pairing_mode_complete

This slipped in by mistake when doing the find -> find_by_id change.

13 years agoUse find_adapter_by_id instead of find_adapter when it makes sense
Johan Hedberg [Mon, 20 Dec 2010 10:42:01 +0000 (12:42 +0200)]
Use find_adapter_by_id instead of find_adapter when it makes sense

In most cases it's more convenient to use the adapter index when looking
up the adapter object since the index is always available in the
adapter_ops callbacks.

13 years agoGet rid of unnecessary manager_stop_adapter function
Johan Hedberg [Mon, 20 Dec 2010 10:35:09 +0000 (12:35 +0200)]
Get rid of unnecessary manager_stop_adapter function

13 years agoSimplify disconnect_addr helper function
Johan Hedberg [Sun, 19 Dec 2010 18:31:11 +0000 (20:31 +0200)]
Simplify disconnect_addr helper function

13 years agoGet rid of unneeded btd_adapter_get_conn_handle function
Johan Hedberg [Sun, 19 Dec 2010 14:50:27 +0000 (16:50 +0200)]
Get rid of unneeded btd_adapter_get_conn_handle function

13 years agoFix handle endianess issues with btd_adapter_read_clock
Johan Hedberg [Sun, 19 Dec 2010 14:34:44 +0000 (16:34 +0200)]
Fix handle endianess issues with btd_adapter_read_clock

13 years agoClean up btd_request_authorization code
Johan Hedberg [Sun, 19 Dec 2010 14:17:15 +0000 (16:17 +0200)]
Clean up btd_request_authorization code

13 years agoRemove unnecessary btd_adapter_get_remote_version function
Johan Hedberg [Sun, 19 Dec 2010 13:30:29 +0000 (15:30 +0200)]
Remove unnecessary btd_adapter_get_remote_version function

13 years agoRename btd_event_inquiry_result to btd_event_device_found
Johan Hedberg [Sun, 19 Dec 2010 13:16:29 +0000 (15:16 +0200)]
Rename btd_event_inquiry_result to btd_event_device_found

13 years agoMove PIN code storage access to core daemon
Johan Hedberg [Sun, 19 Dec 2010 13:04:32 +0000 (15:04 +0200)]
Move PIN code storage access to core daemon

13 years agoMove storage dependencies from hciops to core daemon
Johan Hedberg [Sun, 19 Dec 2010 12:40:54 +0000 (14:40 +0200)]
Move storage dependencies from hciops to core daemon

13 years agoMove local name parsing to parse_eir_data()
Anderson Lizardo [Fri, 17 Dec 2010 14:57:24 +0000 (10:57 -0400)]
Move local name parsing to parse_eir_data()

13 years agoMove AD flags parsing to parse_eir_data()
Anderson Lizardo [Fri, 17 Dec 2010 14:57:23 +0000 (10:57 -0400)]
Move AD flags parsing to parse_eir_data()

13 years agoModify get_eir_uuids() to parse other EIR data
Anderson Lizardo [Fri, 17 Dec 2010 14:57:22 +0000 (10:57 -0400)]
Modify get_eir_uuids() to parse other EIR data

Currently, EIR parsing (name, UUIDs, flags etc.) is done in various
places. This leads to duplicated checks and does not support parsing
multiple AD/EIR structures on a single transfer.

These changes modify get_eir_uuids() to parse other EIR data types and
avoid passing raw EIR data to higher layers.

To accomplish this, get_eir_uuids() was renamed to parse_eir_data(), and
a new (internal) "struct eir_data" was introduced to store the parsed
data.

This first commit only handles the services UUIDs, following patches
will move other EIR parsing to it until everything is done inside
parse_eir_data().

13 years agoMove get_eir_uuids() from src/adapter.c to src/event.c
Anderson Lizardo [Sun, 19 Dec 2010 12:23:26 +0000 (14:23 +0200)]
Move get_eir_uuids() from src/adapter.c to src/event.c

Moving get_eir_uuids() to src/event.c removes the need to pass the raw
EIR data to higher layers. Now it is not necessary to pass the original
GSList of service UUIDs, because the list is concatenated (with
verification of duplicate entries) on adapter_update_device_from_info()
(for LE) and adapter_update_found_devices() (for BR/EDR).