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)
|
|
This event can be registered by the CT to get notified when any setting
is changed.
Per spec every single setting must be sent so the CT can track settings
being added or removed.
|
|
This information is not really useful as debug and there are better
tools for sniffing traffic such as hcidump and wireshark.
|
|
If the session is not added in the list if the player gets
unregistered it will not be cleared from the session which might cause a
crash if the tries to access it.
|
|
Some devices w.g. Sony MW600 will stop using certain commands if an
error happen, so the code now just fake a player and once a real
player is registered it takes place of the fake one.
|
|
This replaces get_metadata callback with get_string and get_uint32
which uses proper types as return.
|
|
avctp_disconnect does disconnect immediatelly so there is no time to
set the pending message.
|
|
The device pointer in struct connect_req can be completely removed since
the callback already receives such pointer, and the network_peer takes
care of the device refcounting.
|
|
By default, both stdout and syslog messages go to the systemd journal,
which results in duplicate messages being logged.
|
|
|
|
Add the disconnect hook to the btd_profile.
|
|
Expose the same API exposed in D-Bus to disconnect devices.
|
|
Use the local_ name prefix for functions implementing the D-Bus API.
|
|
Add the btd_profile hooks to connect and disconnect all three network
roles.
|
|
Split the possible roles into three different btd_profile instances, one
role each, in accordance with the rest of the existing profiles.
|
|
Separate the D-Bus code from the internal connection handling code,
exposing an internal API in case some internal codepath/plugin is
interested in using it.
|
|
Avoid the connection_ prefix for local functions implementing the D-Bus
API.
|
|
Only one type of server is being installed (BNEP_SVC_NAP), but the
server API actually supports having several of them. Therefore, it is
more accurate to specify BNEP_SVC_NAP in the manager's side.
|
|
|
|
|
|
|
|
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.
|
|
Adapt to the new DBus.Properties and cleanup the format used in this
documentation to be similar to the other profiles.
|
|
|
|
Also remove a needless strdup to send type property.
|
|
|
|
|
|
|
|
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>
|
|
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()
|
|
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.
|