OSDN Git Service

android-x86/external-bluetooth-bluez.git
11 years agosap: Fix usage of wrong struct in get_properties()
Lucas De Marchi [Thu, 18 Oct 2012 22:03:47 +0000 (19:03 -0300)]
sap: Fix usage of wrong struct in get_properties()

11 years agoinput: Fix not sending PropertiesChanged signal
Lucas De Marchi [Thu, 18 Oct 2012 22:03:46 +0000 (19:03 -0300)]
input: Fix not sending PropertiesChanged signal

11 years agocore: Update gdbus function calls
Lucas De Marchi [Wed, 17 Oct 2012 15:14:29 +0000 (12:14 -0300)]
core: Update gdbus function calls

Done by the following semantic patch, with manual tweaks afterwards due
to changes in 80-chars line breaks:

// <smpl>
@r1 @
expression E1;
@@
 g_dbus_pending_property_success(
-  E1,
   ...)

@r2 @
expression E1;
@@
 g_dbus_pending_property_error(
-  E1,
   ...)

@r3 @
expression E1;
@@
 g_dbus_pending_property_error_valist(
-  E1,
   ...)
// </smpl>

11 years agogdbus: Remove connection from pending_property functions
Lucas De Marchi [Wed, 17 Oct 2012 15:14:28 +0000 (12:14 -0300)]
gdbus: Remove connection from pending_property functions

The reply to a DBus.Properties.Set() method call should go through the
same D-Bus connection. Thus remove the DBusConnection parameter from the
following functions:

    - g_dbus_pending_property_success()
    - g_dbus_pending_property_error_valist()
    - g_dbus_pending_property_error()

11 years agoadapter: Fix memory leak on discovery cleanup
Anderson Lizardo [Wed, 17 Oct 2012 23:15:09 +0000 (20:15 -0300)]
adapter: Fix memory leak on discovery cleanup

During discovery cleanup, it was attempted to send a DevicesFound()
D-Bus signal for pending found devices, but adapter->discovery was set
to NULL before calling send_devices_found(), therefore it never sent any
signal (and there was a leak of discovery->pending list).

Fixes this memory leak when pairing two LE devices:

==1822== 8 bytes in 1 blocks are definitely lost in loss record 42 of
246
==1822==    at 0x482BE68: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==1822==    by 0x48869AA: standard_malloc (gmem.c:85)
==1822==    by 0x4886E42: g_malloc (gmem.c:159)
==1822==    by 0x489B26D: g_slice_alloc (gslice.c:1003)
==1822==    by 0x489C10A: g_slist_prepend (gslist.c:265)
==1822==    by 0x1855AE: adapter_update_found_devices (adapter.c:2846)
==1822==    by 0x191431: btd_event_device_found (event.c:260)
==1822==    by 0xBC01001A: ???
==1822==

11 years agotest: List only specified adapter's devices in list-devices
Johan Hedberg [Wed, 17 Oct 2012 14:38:38 +0000 (17:38 +0300)]
test: List only specified adapter's devices in list-devices

11 years agodevice: Fix modifying list while iterating
Mikel Astiz [Wed, 17 Oct 2012 10:07:09 +0000 (12:07 +0200)]
device: Fix modifying list while iterating

A list should not be modified while iterating on it, and in this case
the solution is trivial: the code is just trying to free the whole list
with a previous call to profile->device_remove() per list item.

11 years agoheartrate: Always write measurement CCC on discovery
Andrzej Kaczmarek [Wed, 17 Oct 2012 07:51:33 +0000 (09:51 +0200)]
heartrate: Always write measurement CCC on discovery

Measurement CCC is written during discovery only in case watcher is
registered and notifications shall be enabled. However, it may happen
that (e.g. during reconnection scenario) notifications are already
enabled on remote but watcher is no longer registered and we will
be receiving unwanted notifications.

This patch makes sure measurement CCC is written to proper value
every time it's discovered during connection.

11 years agodoc: Update to match latest BlueZ 5 API
Johan Hedberg [Wed, 17 Oct 2012 07:42:41 +0000 (10:42 +0300)]
doc: Update to match latest BlueZ 5 API

11 years agoadapter: Remove not used defines
Szymon Janc [Tue, 16 Oct 2012 10:12:59 +0000 (12:12 +0200)]
adapter: Remove not used defines

check_address and OFF_TIMER are not used anymore.

11 years agolib: Simplify str2ba function
Szymon Janc [Tue, 16 Oct 2012 10:12:58 +0000 (12:12 +0200)]
lib: Simplify str2ba function

Reverse loop iteration so that baswap call is not needed.

11 years agomgmt: Remove not used members from controller_info
Szymon Janc [Tue, 16 Oct 2012 10:12:57 +0000 (12:12 +0200)]
mgmt: Remove not used members from controller_info

notified, version, manufacturer and dev_class were not used for
anything usefull. For debug print reply can be used directly.

11 years agoinput: Remove not needed adapters list in manager
Szymon Janc [Tue, 16 Oct 2012 10:12:56 +0000 (12:12 +0200)]
input: Remove not needed adapters list in manager

adapters list is not used for anything usefull.

11 years agonetwork: Remove redundant struct network_peer members
Szymon Janc [Tue, 16 Oct 2012 10:12:55 +0000 (12:12 +0200)]
network: Remove redundant struct network_peer members

struct network_peer holds reference to btd_device so path, src and dst
can be accessed from it.

11 years agoaudio: Remove path from struct audio_device
Szymon Janc [Tue, 16 Oct 2012 10:12:54 +0000 (12:12 +0200)]
audio: Remove path from struct audio_device

struct audio_device is holding a reference to btd_device and path can
be easily taken from it when needed.

11 years agomgmt: Make mgmt_update_powered return void
Szymon Janc [Tue, 16 Oct 2012 10:12:53 +0000 (12:12 +0200)]
mgmt: Make mgmt_update_powered return void

mgmt_update_powered always returned 0 and this was never checked by
caller.

11 years agoaudio: Move btd_device unref after last use in device_free
Szymon Janc [Tue, 16 Oct 2012 10:12:52 +0000 (12:12 +0200)]
audio: Move btd_device unref after last use in device_free

btd_device should not be used after local reference was dropped.

11 years agodevice: Mark services as resolved also when loading from storage
Johan Hedberg [Tue, 16 Oct 2012 08:51:31 +0000 (11:51 +0300)]
device: Mark services as resolved also when loading from storage

11 years agocontrol: Add Control.Disconnect method
Luiz Augusto von Dentz [Mon, 15 Oct 2012 14:05:36 +0000 (16:05 +0200)]
control: Add Control.Disconnect method

This method can be used to disconnect AVRCP.

11 years agocontrol: Add Control.Connect API
Luiz Augusto von Dentz [Mon, 15 Oct 2012 14:05:35 +0000 (16:05 +0200)]
control: Add Control.Connect API

This method can be used to manually connect AVRCP when acting as a
controller.

11 years agocontrol: Add basic support for AVRCP 1.0 controller
Luiz Augusto von Dentz [Mon, 15 Oct 2012 14:05:34 +0000 (16:05 +0200)]
control: Add basic support for AVRCP 1.0 controller

11 years agoAVRCP: Add proper role init procedure
Luiz Augusto von Dentz [Mon, 15 Oct 2012 14:05:33 +0000 (16:05 +0200)]
AVRCP: Add proper role init procedure

11 years agoAVRCP: Fix handling TG PDUs as they were CT PDUs
Luiz Augusto von Dentz [Mon, 15 Oct 2012 14:05:32 +0000 (16:05 +0200)]
AVRCP: Fix handling TG PDUs as they were CT PDUs

PDU handling needs to different depending on the acting role.

11 years agoAVRCP: Fix reading wrong profile when acting as a controller
Luiz Augusto von Dentz [Mon, 15 Oct 2012 14:05:31 +0000 (16:05 +0200)]
AVRCP: Fix reading wrong profile when acting as a controller

The role indicate which record should be read so we properly determine
the version and what features are supported.

11 years agoAVCTP: Add proper queueing for channels
Luiz Augusto von Dentz [Mon, 15 Oct 2012 14:05:30 +0000 (16:05 +0200)]
AVCTP: Add proper queueing for channels

Add a request queue to channels to avoid dispatching too many requests
at once as the number of transaction is quite limited (16).

11 years agoAVCTP: Add proper prefix to AVC passthrough codes
Luiz Augusto von Dentz [Mon, 15 Oct 2012 14:05:29 +0000 (16:05 +0200)]
AVCTP: Add proper prefix to AVC passthrough codes

11 years agoAVCTP: Wait confirmation to send button release
Luiz Augusto von Dentz [Mon, 15 Oct 2012 14:05:28 +0000 (16:05 +0200)]
AVCTP: Wait confirmation to send button release

11 years agoAVCTP: Make use of allocate buffer to send data
Luiz Augusto von Dentz [Mon, 15 Oct 2012 14:05:27 +0000 (16:05 +0200)]
AVCTP: Make use of allocate buffer to send data

There is no need to use the stack as the channel now have proper buffer
which can be used to store data to be send.

In addition to that make avctp_send_passthrough to use avctp_send.

11 years agoAVRCP: Simplify state_changed callback
Luiz Augusto von Dentz [Mon, 15 Oct 2012 14:05:26 +0000 (16:05 +0200)]
AVRCP: Simplify state_changed callback

Move session creation and destroy to their own functions

11 years agoAVRCP: Fix crash on disconnect
Luiz Augusto von Dentz [Mon, 15 Oct 2012 14:05:25 +0000 (16:05 +0200)]
AVRCP: Fix crash on disconnect

In case of multiple session being active the code was registering one
PDU hanlder per AVRCP session and given the session pointer as user data
causing the following:

    24 bytes in 1 blocks are definitely lost in loss record 370 of 893
       at 0x4A0884D: malloc (vg_replace_malloc.c:263)
       by 0x4C803FE: g_malloc (in /usr/lib64/libglib-2.0.so.0.3200.4)
       by 0x12EE9D: avctp_register_browsing_pdu_handler (avctp.c:1259)
       by 0x12FD7B: state_changed (avrcp.c:1402)
       by 0x12D391: avctp_set_state (avctp.c:403)
       by 0x12E6B4: avctp_confirm_cb (avctp.c:871)
       by 0x1606A3: server_cb (btio.c:254)
       by 0x4C7A824: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3200.4)
       by 0x4C7AB57: ??? (in /usr/lib64/libglib-2.0.so.0.3200.4)
       by 0x4C7AF51: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3200.4)
       by 0x120EA1: main (main.c:551)

To fix this the PDU handlers are now per AVCTP session/channel so each
AVRCP session can register its own handler and pass itself as user
data.

11 years agoAVRCP: Register to AVCTP state changes without depending on player
Luiz Augusto von Dentz [Mon, 15 Oct 2012 14:05:23 +0000 (16:05 +0200)]
AVRCP: Register to AVCTP state changes without depending on player

It is not longer necessary to have a player to be able to register the
extra pdu handlers.

11 years agoAVCTP: Allocate memory to hold incoming/outgoing PDUs
Luiz Augusto von Dentz [Mon, 15 Oct 2012 14:05:22 +0000 (16:05 +0200)]
AVCTP: Allocate memory to hold incoming/outgoing PDUs

This makes possible to the handler to respond asyncronous as the memory
remains valid after it returns.

In addition to that it uses the MTU to calculate the buffer size
necessary.

11 years agoAVCTP: Simplify channel handling
Luiz Augusto von Dentz [Mon, 15 Oct 2012 14:05:21 +0000 (16:05 +0200)]
AVCTP: Simplify channel handling

Make both control and browsing channels to use the same structure to
store its channel information.

11 years agoadapter: Use g_slist_free_full for cleaning up discovery->found
Johan Hedberg [Mon, 15 Oct 2012 20:03:11 +0000 (23:03 +0300)]
adapter: Use g_slist_free_full for cleaning up discovery->found

11 years agoadapter: Use idle callbacks for forcing DevicesFound events
Johan Hedberg [Mon, 15 Oct 2012 12:55:48 +0000 (15:55 +0300)]
adapter: Use idle callbacks for forcing DevicesFound events

This way we ensure that we include all found devices from the current
mainloop iteration into the DevicesFound signal.

11 years agotest: Add timeout option to simple-agent
Johan Hedberg [Mon, 15 Oct 2012 12:03:06 +0000 (15:03 +0300)]
test: Add timeout option to simple-agent

11 years agodevice: Implement Device.CancelPairing method
Johan Hedberg [Mon, 15 Oct 2012 12:02:30 +0000 (15:02 +0300)]
device: Implement Device.CancelPairing method

11 years agoadapter: Remove legacy CancelDeviceCreation method
Johan Hedberg [Mon, 15 Oct 2012 11:30:01 +0000 (14:30 +0300)]
adapter: Remove legacy CancelDeviceCreation method

11 years agotest: Update simple-agent to support the new Device.Pair API
Johan Hedberg [Mon, 15 Oct 2012 11:25:54 +0000 (14:25 +0300)]
test: Update simple-agent to support the new Device.Pair API

11 years agoTODO: Mark CreateDevice/CreatePairedDevice removal as done
Johan Hedberg [Mon, 15 Oct 2012 11:06:36 +0000 (14:06 +0300)]
TODO: Mark CreateDevice/CreatePairedDevice removal as done

11 years agocore: Add timer for removing temporary discovered device objects
Johan Hedberg [Mon, 15 Oct 2012 11:05:13 +0000 (14:05 +0300)]
core: Add timer for removing temporary discovered device objects

11 years agogdbus: Fix invalid memory access during interface removal
Johan Hedberg [Mon, 15 Oct 2012 10:21:11 +0000 (13:21 +0300)]
gdbus: Fix invalid memory access during interface removal

If an interface is removed from the root path during the same mainloop
iteration that it was added we need to check for data->added before
doing the check for data->parent == NULL in the remove_interface()
function. Otherwise the added interface doesn't get removed from the
data->added list and will result in accessing freed memory:

==337== Invalid read of size 8
==337==    at 0x4F65AFA: dbus_message_iter_append_basic (in /usr/lib64/libdbus-1.so.3.7.1)
==337==    by 0x1247B5: append_interface (object.c:556)
==337==    by 0x4C8DC5C: g_slist_foreach (gslist.c:840)
==337==    by 0x1261F7: process_changes (object.c:594)
==337==    by 0x126372: generic_unregister (object.c:997)
==337==    by 0x4F69669: ??? (in /usr/lib64/libdbus-1.so.3.7.1)
==337==    by 0x4F5CE51: dbus_connection_unregister_object_path (in /usr/lib64/libdbus-1.so.3.7.1)
==337==    by 0x125E81: object_path_unref (object.c:1236)
==337==    by 0x126136: g_dbus_unregister_interface (object.c:1361)
==337==    by 0x14CDF0: service_exit (service.c:581)
==337==    by 0x177556: plugin_cleanup (plugin.c:242)
==337==    by 0x12221F: main (main.c:559)
==337==  Address 0x5bc1550 is 0 bytes inside a block of size 56 free'd
==337==    at 0x4A079AE: free (vg_replace_malloc.c:427)
==337==    by 0x4C7850E: g_free (gmem.c:252)
==337==    by 0x125DB0: remove_interface (object.c:671)
==337==    by 0x125E3B: object_path_unref (object.c:1230)
==337==    by 0x126136: g_dbus_unregister_interface (object.c:1361)
==337==    by 0x14CDF0: service_exit (service.c:581)
==337==    by 0x177556: plugin_cleanup (plugin.c:242)
==337==    by 0x12221F: main (main.c:559)

11 years agomedia: Fix leaking endpoint in case of failure to register SEP
Luiz Augusto von Dentz [Mon, 15 Oct 2012 09:51:27 +0000 (11:51 +0200)]
media: Fix leaking endpoint in case of failure to register SEP

This can happen in case of AudioSink and/or AudioSource are disabled in
audio.conf.

11 years agoheartrate: Convert to DBus.Properties
Andrzej Kaczmarek [Sat, 13 Oct 2012 16:56:19 +0000 (18:56 +0200)]
heartrate: Convert to DBus.Properties

11 years agoheartrate: Remove unused measurement characteristic value handle
Andrzej Kaczmarek [Sat, 13 Oct 2012 15:18:22 +0000 (17:18 +0200)]
heartrate: Remove unused measurement characteristic value handle

Since notification handler is now registered only for measurement
characteristic value handle it's no longer needed to keep this handle.

11 years agoheartrate: Fix registration of notification handler
Andrzej Kaczmarek [Sat, 13 Oct 2012 15:18:21 +0000 (17:18 +0200)]
heartrate: Fix registration of notification handler

Notification handler is registered only when CCC is written during
descriptors discovery, i.e. at least one watcher is registered before
device is connected. This means there will be no handler registered in
case watcher is registered after device already connected.
This is side-effect of 74a9fc7.

This patch registers handler immediately when measurement characteristic
is discovered so it does not matter when watcher is registered.

ccc_write_cb() is reduntant in this case so it's removed.

11 years agoinput: Convert to DBus.Properties
Lucas De Marchi [Thu, 11 Oct 2012 18:57:48 +0000 (15:57 -0300)]
input: Convert to DBus.Properties

11 years agotest: Update test-discovery to match new API
Johan Hedberg [Fri, 12 Oct 2012 10:42:36 +0000 (12:42 +0200)]
test: Update test-discovery to match new API

11 years agoadapter: Add DevicesFound signal
Johan Hedberg [Fri, 12 Oct 2012 10:31:04 +0000 (12:31 +0200)]
adapter: Add DevicesFound signal

11 years agogdbus: Add g_dbus_get_properties function
Johan Hedberg [Fri, 12 Oct 2012 08:55:37 +0000 (10:55 +0200)]
gdbus: Add g_dbus_get_properties function

This function can be used to construct custom D-Bus messages containing
the properties for a specific interface on a given path.

11 years agodoc: Update adapter and device D-Bus APIs
Johan Hedberg [Fri, 12 Oct 2012 08:47:36 +0000 (10:47 +0200)]
doc: Update adapter and device D-Bus APIs

11 years agoadapter: Remove out of range devices tracking
Johan Hedberg [Fri, 12 Oct 2012 08:40:21 +0000 (10:40 +0200)]
adapter: Remove out of range devices tracking

With interleaved discovery the inquiry is so short that there's a good
chance of nearby devices in not showing up during some cycles. This
makes tracking "out of range" devices unreliable and it's therefore
better to remove it. Devices get their RSSI property invalidated when a
discovery cycle finishes so devices that are not found anymore can still
be easily sorted with a lower priority by UIs.

11 years agocore: Create devices dynamically during discovery
Johan Hedberg [Thu, 11 Oct 2012 10:14:30 +0000 (12:14 +0200)]
core: Create devices dynamically during discovery

11 years agotest: Update test-discovery to support the latest API
Johan Hedberg [Thu, 11 Oct 2012 10:35:29 +0000 (12:35 +0200)]
test: Update test-discovery to support the latest API

11 years agoadapter: Remove Create(Paired)Device methods
Johan Hedberg [Thu, 11 Oct 2012 10:11:01 +0000 (12:11 +0200)]
adapter: Remove Create(Paired)Device methods

These are not needed when devices get created dynamically during
discovery.

11 years agodevice: Add device_name_known convenience function
Johan Hedberg [Thu, 11 Oct 2012 10:07:32 +0000 (12:07 +0200)]
device: Add device_name_known convenience function

11 years agodevice: Add LegacyPairing and RSSI properties
Johan Hedberg [Thu, 11 Oct 2012 08:42:16 +0000 (10:42 +0200)]
device: Add LegacyPairing and RSSI properties

These are needed for the new device discovery where we create objects
for each found device.

11 years agorctest: add option to save received data to file
Gustavo Padovan [Mon, 8 Oct 2012 03:50:03 +0000 (11:50 +0800)]
rctest: add option to save received data to file

works only for automated test option for now

11 years agorctest: add automated test
Gustavo Padovan [Mon, 8 Oct 2012 03:50:02 +0000 (11:50 +0800)]
rctest: add automated test

adds -a option to enable automated tests. We use the -i option to define
the receiving side and the -a define the sending side:

./rctest -i hci0 -a hci1

11 years agogdbus: Add support for invalidated properties
Johan Hedberg [Thu, 11 Oct 2012 09:53:27 +0000 (11:53 +0200)]
gdbus: Add support for invalidated properties

If there's a pending property but its exists() callback returns false
the property should be considered invalidated and included in the
relevant list of the PropertiesChanged signal.

11 years agohog: Fix passing NULL pointer to g_attrib_unregister
Johan Hedberg [Thu, 11 Oct 2012 12:03:41 +0000 (15:03 +0300)]
hog: Fix passing NULL pointer to g_attrib_unregister

The hogdev->attrib pointer can be NULL if we got disconnected.

11 years agohog: Fix requested range for descriptor discovery
João Paulo Rechi Vita [Thu, 11 Oct 2012 05:31:23 +0000 (02:31 -0300)]
hog: Fix requested range for descriptor discovery

When discovering descriptors of the last characteristic of a service the
discovery range was exceeding the service limits. This commit keeps the
discovery within the limits of the HoG service.

11 years agohog: Fix characteristic descriptor discovery
João Paulo Rechi Vita [Thu, 11 Oct 2012 05:31:22 +0000 (02:31 -0300)]
hog: Fix characteristic descriptor discovery

The discover descriptors sub-procedure is complete when the error
response is received and the error code is set to "Attribute Not Found"
or the find information response has an attribute handle that is equal
to the last handle in the request. This commit fixes the stop condition
for characteristic descriptor discovery.

11 years agocore: Fix connecting to an already connected device on pairing
João Paulo Rechi Vita [Thu, 11 Oct 2012 05:30:46 +0000 (02:30 -0300)]
core: Fix connecting to an already connected device on pairing

11 years agotest: Add support for passing address type to btiotest
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:56:43 +0000 (20:56 -0300)]
test: Add support for passing address type to btiotest

11 years agogas: Add the per handle GATT event notifier
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:55:57 +0000 (20:55 -0300)]
gas: Add the per handle GATT event notifier

11 years agoheartrate: Use the per handle GATT event notifier
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:55:56 +0000 (20:55 -0300)]
heartrate: Use the per handle GATT event notifier

11 years agohog: Use the per handle GATT event notifier
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:55:55 +0000 (20:55 -0300)]
hog: Use the per handle GATT event notifier

11 years agoscan: Use the per handle GATT event notifier
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:55:54 +0000 (20:55 -0300)]
scan: Use the per handle GATT event notifier

11 years agogattrib: Add support for listening for events for specific handles
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:55:53 +0000 (20:55 -0300)]
gattrib: Add support for listening for events for specific handles

We want only the profile that implements a service to be notified of
changes on that service. Before this patch, all the registered event
notifiers are being called.

11 years agogas: Only do the Exchange MTU procedure over LE links
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:35:03 +0000 (20:35 -0300)]
gas: Only do the Exchange MTU procedure over LE links

The Exchange MTU procedure should only be performed over LE links,
we are using the check of the Channel ID used to verify this.

11 years agoattrib: Fix not checking if att_data_list_alloc fails
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:35:02 +0000 (20:35 -0300)]
attrib: Fix not checking if att_data_list_alloc fails

Now that this function may fail in more usual situations (invalid
input), we have to check its return value.

11 years agoatt: Fix sending pdu's with invalid data
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:35:01 +0000 (20:35 -0300)]
att: Fix sending pdu's with invalid data

When encoding an att_data_list we need to make sure that each element
lenght of the data list will not exceed 255, because that information
will be encoded as a octet later.

11 years agoatt: Replace ATT_MAX_MTU with ATT_MAX_VALUE_LEN
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:35:00 +0000 (20:35 -0300)]
att: Replace ATT_MAX_MTU with ATT_MAX_VALUE_LEN

ATT has the concept that an attribute value has a maximum length and we
weren't keeping track of this.

11 years agoattrib: Remove all the usages of ATT_MAX_MTU
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:34:59 +0000 (20:34 -0300)]
attrib: Remove all the usages of ATT_MAX_MTU

This "define" was bogus for two reasons: 1. There's no concept
of maximum MTU in the ATT level; 2. It was used as a maximum attribute
value length.

11 years agogattrib: Fix ignoring the error message when write fails
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:34:58 +0000 (20:34 -0300)]
gattrib: Fix ignoring the error message when write fails

If an error happens during writing to the socket, we should complain
that it failed.

11 years agoevent: Use bool instead gboolean for legacy parameter
Szymon Janc [Wed, 10 Oct 2012 13:19:58 +0000 (15:19 +0200)]
event: Use bool instead gboolean for legacy parameter

This will avoid mixing bool and gboolean in btd_event_device_found
definition. Whole execution chain for legacy parameter is also
converted to bool type.

11 years agocore: Pass confirm name as bool value
Szymon Janc [Wed, 10 Oct 2012 13:19:57 +0000 (15:19 +0200)]
core: Pass confirm name as bool value

confirm_name is a boolean value and can be pass as such instead of
uint8_t.

11 years agoaudio: Remove redundant procedure when a2dp connect
Chan-yeol Park [Tue, 9 Oct 2012 11:35:48 +0000 (20:35 +0900)]
audio: Remove redundant procedure when a2dp connect

This patch fixes the bug that when remote host is down a2dp connection failure
is handled like XCASE

11 years agoaudio: Fix audio driver is not probed
Chan-yeol Park [Tue, 9 Oct 2012 11:35:47 +0000 (20:35 +0900)]
audio: Fix audio driver is not probed

This patch fix the bugs that when handling an AVDTP incoming connection,
audio-a2dp driver is not probed because advanced audio UUID is missed.

11 years agoavinfo: Print a2dp vendor codec info
Chan-yeol Park [Tue, 9 Oct 2012 11:35:46 +0000 (20:35 +0900)]
avinfo: Print a2dp vendor codec info

11 years agoavinfo: Replace definitions with a2dp-codecs.h's
Chan-yeol Park [Tue, 9 Oct 2012 11:35:45 +0000 (20:35 +0900)]
avinfo: Replace definitions with a2dp-codecs.h's

11 years agoaudio: Add check for vendor specific A2DP codec
Chan-yeol Park [Tue, 9 Oct 2012 11:35:44 +0000 (20:35 +0900)]
audio: Add check for vendor specific A2DP codec

This patch adds checks(vendor ID, vendor specific codec ID) to make sure of
vendor specific A2DP codec selection.

11 years agobuild-sys: Remove leftover AM_YFLAGS
Lucas De Marchi [Tue, 9 Oct 2012 17:51:17 +0000 (14:51 -0300)]
build-sys: Remove leftover AM_YFLAGS

11 years agocore: fix stop scanning after GCEP
João Paulo Rechi Vita [Tue, 9 Oct 2012 17:38:27 +0000 (14:38 -0300)]
core: fix stop scanning after GCEP

The session type identification on struct session req (commit 328661a0)
broke the stop condition of the LE Genereal Connection Establishment
Procedure. This commit creates new identificators for discovery sessions
and makes their naming a bit more clear.

11 years agocore: Add initial Device.Pair() implementation
Johan Hedberg [Tue, 9 Oct 2012 17:38:07 +0000 (19:38 +0200)]
core: Add initial Device.Pair() implementation

This will ultimately replace Adapter.CreatePairedDevice()

11 years agobuild: Add missing documentation files to EXTRA_DIST
Andrzej Kaczmarek [Tue, 9 Oct 2012 13:51:47 +0000 (15:51 +0200)]
build: Add missing documentation files to EXTRA_DIST

This patch adds missing documentation files to EXTRA_DIST variable so
they are included when creating tarball.

11 years agosink: Remove deprecated code
Luiz Augusto von Dentz [Tue, 9 Oct 2012 16:03:53 +0000 (18:03 +0200)]
sink: Remove deprecated code

Remove decrecated properties and signals

11 years agoaudio: Fix memory leak of AVDTP buffer
Luiz Augusto von Dentz [Tue, 9 Oct 2012 16:03:52 +0000 (18:03 +0200)]
audio: Fix memory leak of AVDTP buffer

Upon disconnection all references to AVDTP session should be release
otherwise the data associate with it cannot be freed and new connection
may overwrite the buf pointer causing it to leak.

11 years agodevice: Remove not used device_set_class function
Szymon Janc [Tue, 9 Oct 2012 12:12:02 +0000 (14:12 +0200)]
device: Remove not used device_set_class function

With mgmt interface CoD cannot change as it is only received in EIR when
device is discovered or connected. Was only used in
btd_event_remote_class which is now removed.

11 years agoadapter: Remove not used btd_adapter_switch_{online,offline} functions
Szymon Janc [Tue, 9 Oct 2012 12:12:01 +0000 (14:12 +0200)]
adapter: Remove not used btd_adapter_switch_{online,offline} functions

Were used only in Maemo plugin which is now removed.

11 years agostorage: Remove not used read_remote_features
Szymon Janc [Tue, 9 Oct 2012 12:12:00 +0000 (14:12 +0200)]
storage: Remove not used read_remote_features

It was only usefull with hciops.

11 years agostorage: Remove not used write_features_info
Szymon Janc [Tue, 9 Oct 2012 12:11:59 +0000 (14:11 +0200)]
storage: Remove not used write_features_info

This was used in hciops.

11 years agostorage: Remove not used write_version_info
Szymon Janc [Tue, 9 Oct 2012 12:11:58 +0000 (14:11 +0200)]
storage: Remove not used write_version_info

This was used in hciops only.

11 years agostorage: Remove not used read_remote_eir
Szymon Janc [Tue, 9 Oct 2012 12:11:57 +0000 (14:11 +0200)]
storage: Remove not used read_remote_eir

This function is not used. Previously it was used to determine if
remote device is legacy or not.

11 years agoevent: Don't store EIR in btd_event_device_found
Szymon Janc [Tue, 9 Oct 2012 12:11:56 +0000 (14:11 +0200)]
event: Don't store EIR in btd_event_device_found

It is never read and was usefull only to gather EIR data for testing
which can also be done with hcidump etc.

11 years agoSimplify checking if found device is legacy
Szymon Janc [Tue, 9 Oct 2012 12:11:54 +0000 (14:11 +0200)]
Simplify checking if found device is legacy

This simplify code by removing pairing_is_legacy() function which was
always returning FALSE due to EIR being always present with mgmt
interface (this also fix small issue when first DeviceFound signal
emitted for legacy device was having LegacyPairing set to false).

Instead of using btd_event_set_legacy_pairing to set legacy pairing in
remote_dev_info handle it in similar way to rssi.

11 years agodoc: Reformat thermometer-api.txt to follow 80-character rule
Johan Hedberg [Tue, 9 Oct 2012 15:58:40 +0000 (17:58 +0200)]
doc: Reformat thermometer-api.txt to follow 80-character rule

11 years agothermometer: Fix missing braces
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:58 +0000 (13:19 +0200)]
thermometer: Fix missing braces

11 years agothermometer: Fix indentation
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:57 +0000 (13:19 +0200)]
thermometer: Fix indentation