| d9f9f2e2 |
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. |
Luiz Augusto von Dentz |
13 years ago |
1 file, +34, -49 |
| b8bf7a40 |
AVRCP: Simplify state_changed callback
Move session creation and destroy to their own functions |
Luiz Augusto von Dentz |
13 years ago |
1 file, +53, -38 |
| 0388fd57 |
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. |
Luiz Augusto von Dentz |
13 years ago |
4 files, +148, -99 |
| ec2a1f21 |
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. |
Luiz Augusto von Dentz |
13 years ago |
1 file, +3, -3 |
| b5666a37 |
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. |
Luiz Augusto von Dentz |
13 years ago |
1 file, +22, -9 |
| 642c243c |
AVCTP: Simplify channel handling
Make both control and browsing channels to use the same structure to
store its channel information. |
Luiz Augusto von Dentz |
13 years ago |
1 file, +82, -73 |
| f7fb5af2 |
adapter: Use g_slist_free_full for cleaning up discovery->found |
Johan Hedberg |
13 years ago |
1 file, +2, -3 |
| 8e1c0089 |
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. |
Johan Hedberg |
13 years ago |
1 file, +2, -3 |
| 58345dec |
test: Add timeout option to simple-agent |
Johan Hedberg |
13 years ago |
1 file, +15, -2 |
| 28c1a744 |
device: Implement Device.CancelPairing method |
Johan Hedberg |
13 years ago |
1 file, +17, -0 |
| 582eafac |
adapter: Remove legacy CancelDeviceCreation method |
Johan Hedberg |
13 years ago |
1 file, +0, -36 |
| be9a6756 |
test: Update simple-agent to support the new Device.Pair API |
Johan Hedberg |
13 years ago |
1 file, +9, -10 |
| 09b00329 |
TODO: Mark CreateDevice/CreatePairedDevice removal as done |
Johan Hedberg |
13 years ago |
1 file, +1, -1 |
| cabc7640 |
core: Add timer for removing temporary discovered device objects |
Johan Hedberg |
13 years ago |
2 files, +47, -2 |
| 85f7f418 |
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) |
Johan Hedberg |
13 years ago |
1 file, +6, -6 |
| d0f08e05 |
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. |
Luiz Augusto von Dentz |
13 years ago |
1 file, +1, -1 |
| 6f4d4e03 |
heartrate: Convert to DBus.Properties |
Andrzej Kaczmarek |
13 years ago |
3 files, +46, -39 |
| 7a4839b9 |
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. |
Andrzej Kaczmarek |
13 years ago |
1 file, +0, -3 |
| dbdc5259 |
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. |
Andrzej Kaczmarek |
13 years ago |
1 file, +8, -16 |
| 80351fac |
input: Convert to DBus.Properties |
Lucas De Marchi |
13 years ago |
1 file, +13, -31 |
| b4f4f56f |
adapter: Add DevicesFound signal |
Johan Hedberg |
13 years ago |
1 file, +155, -38 |
| 1d862e73 |
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. |
Johan Hedberg |
13 years ago |
2 files, +21, -0 |
| 3b025cb7 |
test: Update test-discovery to match new API |
Johan Hedberg |
13 years ago |
1 file, +26, -63 |
| 293bbb4a |
doc: Update adapter and device D-Bus APIs |
Johan Hedberg |
13 years ago |
2 files, +15, -65 |
| 826023de |
core: Create devices dynamically during discovery |
Johan Hedberg |
13 years ago |
5 files, +173, -439 |
| b1f1b58e |
test: Update test-discovery to support the latest API |
Johan Hedberg |
13 years ago |
1 file, +89, -18 |
| f99775d4 |
adapter: Remove Create(Paired)Device methods
These are not needed when devices get created dynamically during
discovery. |
Johan Hedberg |
13 years ago |
1 file, +0, -130 |
| e496acea |
device: Add device_name_known convenience function |
Johan Hedberg |
13 years ago |
2 files, +6, -0 |
| f66abea5 |
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. |
Johan Hedberg |
13 years ago |
1 file, +1, -44 |
| 89bf8576 |
device: Add LegacyPairing and RSSI properties
These are needed for the new device discovery where we create objects
for each found device. |
Johan Hedberg |
13 years ago |
2 files, +69, -0 |
| 389d4f1c |
rctest: add option to save received data to file
works only for automated test option for now |
Gustavo Padovan |
13 years ago |
1 file, +53, -3 |
| 03d1b7a4 |
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 |
Gustavo Padovan |
13 years ago |
1 file, +42, -4 |
| 297691b0 |
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. |
Johan Hedberg |
13 years ago |
1 file, +14, -1 |
| fe4a0f71 |
hog: Fix passing NULL pointer to g_attrib_unregister
The hogdev->attrib pointer can be NULL if we got disconnected. |
Johan Hedberg |
13 years ago |
1 file, +3, -1 |
| 22b89912 |
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. |
João Paulo Rechi Vita |
13 years ago |
1 file, +14, -9 |
| f89c553f |
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. |
João Paulo Rechi Vita |
13 years ago |
1 file, +37, -9 |
| 73e9a4ab |
core: Fix connecting to an already connected device on pairing |
João Paulo Rechi Vita |
13 years ago |
1 file, +1, -1 |
| 7a63b8a0 |
test: Add support for passing address type to btiotest |
Vinicius Costa Gomes |
13 years ago |
1 file, +29, -22 |
| 87747f13 |
gas: Add the per handle GATT event notifier |
Vinicius Costa Gomes |
13 years ago |
1 file, +34, -38 |
| 74a9fc72 |
heartrate: Use the per handle GATT event notifier |
Vinicius Costa Gomes |
13 years ago |
1 file, +145, -142 |
| 85506ccd |
hog: Use the per handle GATT event notifier |
Vinicius Costa Gomes |
13 years ago |
1 file, +36, -34 |
| cb0a835d |
scan: Use the per handle GATT event notifier |
Vinicius Costa Gomes |
13 years ago |
1 file, +2, -13 |
| 0f92869a |
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. |
Vinicius Costa Gomes |
13 years ago |
11 files, +52, -24 |
| 9b8871db |
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. |
Vinicius Costa Gomes |
13 years ago |
1 file, +2, -1 |
| f8619bef |
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. |
Vinicius Costa Gomes |
13 years ago |
2 files, +15, -0 |
| a48a3bac |
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. |
Vinicius Costa Gomes |
13 years ago |
1 file, +3, -0 |
| 9111ffe1 |
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. |
Vinicius Costa Gomes |
13 years ago |
1 file, +1, -1 |
| a2e4b274 |
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. |
Vinicius Costa Gomes |
13 years ago |
4 files, +10, -8 |
| 4c3dec8a |
gattrib: Fix ignoring the error message when write fails
If an error happens during writing to the socket, we should complain
that it failed. |
Vinicius Costa Gomes |
13 years ago |
1 file, +7, -1 |
| 3665ba44 |
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. |
Szymon Janc |
13 years ago |
5 files, +8, -8 |