Age | Commit message (Collapse) | Author | Files | Lines |
|
btd_cancel_authorization should work like g_source_remove and not attempt
to reach the callback as its maybe already invalid or lead to double free
situations such as this:
Invalid write of size 4
at 0x13D480: connection_lost (avdtp.c:1102)
by 0x13F37A: session_cb (avdtp.c:2281)
by 0x4C7B824: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x4C7BB57: ??? (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x4C7BF51: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x122B21: main (main.c:551)
Address 0x6512ac0 is 32 bytes inside a block of size 1,184 free'd
at 0x4A07786: free (vg_replace_malloc.c:446)
by 0x4C8150E: g_free (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x13D4A9: connection_lost (avdtp.c:1216)
by 0x13D55E: auth_cb (avdtp.c:2471)
by 0x17E99A: service_auth_cancel (adapter.c:1021)
by 0x183C67: btd_cancel_authorization (adapter.c:3358)
by 0x13D477: connection_lost (avdtp.c:1098)
by 0x13F37A: session_cb (avdtp.c:2281)
by 0x4C7B824: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x4C7BB57: ??? (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x4C7BF51: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x122B21: main (main.c:551)
|
|
1,262 (64 direct, 1,198 indirect) bytes in 1 blocks are definitely lost in loss record 280 of 290
at 0x4A0881C: malloc (vg_replace_malloc.c:270)
by 0x4C813FE: g_malloc (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x4C95801: g_slice_alloc (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x4C95D55: g_slice_alloc0 (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x4C746AA: g_key_file_new (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x18136C: load_config (adapter.c:2620)
by 0x18353B: adapter_init (adapter.c:2708)
by 0x17E62E: btd_manager_register_adapter (manager.c:337)
by 0x191171: mgmt_event.part.36 (mgmt.c:1081)
by 0x4C7B824: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x4C7BB57: ??? (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x4C7BF51: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3200.4)
|
|
By default, both stdout and syslog messages go to the systemd journal,
which results in duplicate messages being logged.
|
|
|
|
|
|
Read and write config file in ini-file format.
If the file can not be loaded, try to convert legacy configuration.
|
|
Mgmt interface allows to change connectable and discoverable adapter
status even if the adapter is off. So both status are changed during
adapter init.
Remove on_mode from btd_adapter_get_mode(), as it is no more used.
Update src/mgmt.c and plugins/neard.c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fix for memory leak which was introduced in commit
f8619bef3406a2134082dc41c208105fe028c09f.
|
|
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>
|
|
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==
|
|
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.
|
|
check_address and OFF_TIMER are not used anymore.
|
|
notified, version, manufacturer and dev_class were not used for
anything usefull. For debug print reply can be used directly.
|
|
mgmt_update_powered always returned 0 and this was never checked by
caller.
|
|
|
|
|
|
This way we ensure that we include all found devices from the current
mainloop iteration into the DevicesFound signal.
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
These are not needed when devices get created dynamically during
discovery.
|
|
|
|
These are needed for the new device discovery where we create objects
for each found device.
|
|
|
|
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.
|
|
Now that this function may fail in more usual situations (invalid
input), we have to check its return value.
|
|
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.
|
|
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.
|
|
confirm_name is a boolean value and can be pass as such instead of
uint8_t.
|
|
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.
|
|
This will ultimately replace Adapter.CreatePairedDevice()
|
|
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.
|
|
Were used only in Maemo plugin which is now removed.
|
|
It was only usefull with hciops.
|
|
This was used in hciops.
|
|
This was used in hciops only.
|
|
This function is not used. Previously it was used to determine if
remote device is legacy or not.
|
|
It is never read and was usefull only to gather EIR data for testing
which can also be done with hcidump etc.
|
|
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.
|
|
|