| ed3344c9 |
gatt: Add support for find included services
Some services like HID over LE can reference another service using
included services.
See Vol 3, Part G, section 2.6.3 of Core specification for more
details. |
Vinicius Costa Gomes |
13 years ago |
2 files, +201, -0 |
| 2542c37b |
service: Fix passing stack variable as reference value
BDADDR_ANY cannot be return as it uses stack allocation:
Conditional jump or move depends on uninitialised value(s)
at 0x170E47: sdp_record_remove (sdpd-database.c:269)
by 0x17071A: remove_record_from_server (sdpd-service.c:290)
by 0x14D416: exit_callback (service.c:131)
by 0x124396: service_filter (watch.c:486)
by 0x12405A: message_filter (watch.c:554)
by 0x4F63A35: dbus_connection_dispatch (in /usr/lib64/libdbus-1.so.3.5.6)
by 0x122EE7: message_dispatch (mainloop.c:76)
by 0x4C7B3BA: ??? (in /usr/lib64/libglib-2.0.so.0.3200.4)
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 0x1225B1: main (main.c:551)
Uninitialised value was created by a stack allocation
at 0x1705B0: add_record_to_server (sdpd-service.c:235)
Conditional jump or move depends on uninitialised value(s)
at 0x4A0AD21: bcmp (mc_replace_strmem.c:889)
by 0x4C959E0: g_slist_find_custom (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x17C059: manager_find_adapter (manager.c:291)
by 0x170E8F: sdp_record_remove (sdpd-database.c:270)
by 0x17071A: remove_record_from_server (sdpd-service.c:290)
by 0x14D416: exit_callback (service.c:131)
by 0x124396: service_filter (watch.c:486)
by 0x12405A: message_filter (watch.c:554)
by 0x4F63A35: dbus_connection_dispatch (in /usr/lib64/libdbus-1.so.3.5.6)
by 0x122EE7: message_dispatch (mainloop.c:76)
by 0x4C7B3BA: ??? (in /usr/lib64/libglib-2.0.so.0.3200.4)
by 0x4C7A824: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3200.4)
Uninitialised value was created by a stack allocation
at 0x1705B0: add_record_to_server (sdpd-service.c:235) |
Luiz Augusto von Dentz |
13 years ago |
1 file, +2, -8 |
| e1805bb5 |
input: Fix registering HoG service for non-HoG profiles
We need to handle the case that the device has multiple HoG services,
but before registering we must check the service UUID. |
Vinicius Costa Gomes |
13 years ago |
1 file, +3, -0 |
| 274ed938 |
emulator: Add first draft of b1ee tool |
Marcel Holtmann |
13 years ago |
3 files, +222, -1 |
| 7d803e57 |
event: Remove not used btd_event_remote_class
This was used in hciops only. With mgmt interface remote CoD is
received in EIR from Device Found/Connected events. |
Szymon Janc |
13 years ago |
2 files, +0, -23 |
| 7828b1d6 |
gdbus: Fix processing pending properties in remove_interface() |
Johan Hedberg |
13 years ago |
1 file, +2, -0 |
| a7d79c38 |
core: Fix GATT security level for non-paired devices
If we're not paired we shouldn't use medium security (which requires
pairing). |
Johan Hedberg |
13 years ago |
1 file, +8, -1 |
| 34e721f7 |
device: Fix missing iterator append call in dev_property_get_product |
Johan Hedberg |
13 years ago |
1 file, +3, -0 |
| 43baee63 |
build: Indicate 5.x development branch |
Marcel Holtmann |
13 years ago |
1 file, +1, -1 |
| b6fc3cab |
core: Move functions to avoid forward declaration |
Lucas De Marchi |
13 years ago |
1 file, +90, -96 |
| cd65d3cd |
core: Add setters and signals to Device interface |
Lucas De Marchi |
13 years ago |
1 file, +133, -124 |
| b5ce5aa7 |
core: Add DBus.Properties getters for Device interface |
Lucas De Marchi |
13 years ago |
1 file, +319, -88 |
| 26e1bef1 |
doc: Mark optional properties in Device interface |
Lucas De Marchi |
13 years ago |
1 file, +7, -7 |
| 6bcc5737 |
core: Remove useless memset and make icon optional
name is not being really used anywhere, so remove it together with the
memset from Device.GetProperties().
icon is optional, so check if it's not NULL before adding it to the list
of device properties. |
Lucas De Marchi |
13 years ago |
1 file, +3, -5 |
| 335bd95d |
gdbus: Fix up Properties.Set() code path
Minor fixes to make setter actually work:
- Add propdata in pending_property_set
- Break loop when we are removing propdata from list and we
found it
- in_args and out_args were swapped
- interface and method name arguments were swapped |
Lucas De Marchi |
13 years ago |
1 file, +7, -3 |
| 1997090d |
gdbus: Fix invalid memory access while unregistering
If an interface is added and removed on the same mailoop iteration,
ObjectManager would try to send InterfacesAdded signal while running the
idler because the interface was added to data->added list.
This is easily reproduced by forcing an error path in a plugin
registration, like on sap_server_register(), resulting in the following
error:
==11795== Invalid read of size 4
==11795== at 0x496F592: dbus_message_iter_append_basic (dbus-message.c:2598)
==11795== by 0x117B39: append_interface (object.c:554)
==11795== by 0x48955E7: g_slist_foreach (gslist.c:840)
==11795== by 0x11923B: process_changes (object.c:592)
==11795== by 0x11956D: generic_unregister (object.c:980)
==11795== by 0x4973BAC: _dbus_object_tree_unregister_and_unlock (dbus-object-tree.c:516)
==11795== by 0x4965240: dbus_connection_unregister_object_path (dbus-connection.c:5776)
==11795== by 0x1178A5: object_path_unref (object.c:1219)
==11795== by 0x118517: g_dbus_unregister_interface (object.c:1344)
==11795== by 0x19AF5B: sap_exit (sap.c:385)
==11795== by 0x13E9E2: sap_server_register (server.c:1428)
==11795== by 0x13C092: sap_server_probe (manager.c:44)
With this patch we don't send the InterfacesAdded signal, removing it
from data->added while unregistering. |
Lucas De Marchi |
13 years ago |
1 file, +11, -0 |
| 819a9ea8 |
doc: Cycling Speed and Cadence profile (CSCP) API |
Andrzej Kaczmarek |
13 years ago |
1 file, +118, -0 |
| 1912a580 |
AUTHORS: Add missing people |
Johan Hedberg |
13 years ago |
1 file, +4, -0 |
| 87d912e7 |
device: Move auth_type_t definition to device.c
Bonding is handled in device.c and auth_type_t is private device data
not used outside of it. |
Szymon Janc |
13 years ago |
2 files, +8, -8 |
| 97adab62 |
adapter: Don't use adapter_get_path to access adapter path
Use struct btd_adapter directly to access path member. |
Szymon Janc |
13 years ago |
1 file, +1, -2 |
| 8d9ee2ab |
adapter: Don't use adapter_get_address to access adapter address
Use struct btd_adapter directly to access bdaddr member. |
Szymon Janc |
13 years ago |
1 file, +3, -3 |
| d8697f72 |
device: Don't use device_get_addr_type to access device address type
Use struct btd_device directly to access bdaddr_type member. |
Szymon Janc |
13 years ago |
1 file, +1, -4 |
| f1049bc1 |
device: Don't use device_get_adapter to access device adapter
Use struct btd_device directly to access adapter member. |
Szymon Janc |
13 years ago |
1 file, +14, -20 |
| 74ebcc4e |
device: Remove bogus line from device_create_bonding
This is a typo from 899e6561d284806007b7e57e1ab3b65e54be3d22. |
Szymon Janc |
13 years ago |
1 file, +0, -1 |
| b95ea6f3 |
device: Make device_get_address return const pointer |
Szymon Janc |
13 years ago |
2 files, +2, -2 |
| 8a9762e7 |
adapter: Constify use of bdaddr_t pointer parameters
Mark all input only bdaddr_t pointer parameters as const. |
Szymon Janc |
13 years ago |
2 files, +58, -45 |
| 0336136e |
mgmt: Constify use of bdaddr_t pointer parameters
Mark all input only bdaddr_t pointer parameters as const. |
Szymon Janc |
13 years ago |
5 files, +38, -36 |
| ed6a8af4 |
device: Convert device_get_address into simple getter
This allow to remove number of local variables used only to get device
address and pass it as pointer later on.
bdaddr_type parameter is also removed as there is device_get_addr_type
already present which can be used to get it if needed. |
Szymon Janc |
13 years ago |
14 files, +87, -140 |
| 4c34fcd0 |
adapter: Constify pointer returned by adapter_get_address |
Szymon Janc |
13 years ago |
18 files, +40, -30 |
| d58929d7 |
storage: Constify bdaddr_t pointers parameters |
Szymon Janc |
13 years ago |
2 files, +105, -87 |
| 899e6561 |
adapter: Convert adapter_get_address into simple getter
Most uses of adapter_get_address were in form of:
bdaddr_t addr;
adapter_get_address(adapter, &addr);
foo(&addr);
Changing it to getter makes code simpler and avoid number of not
needed memcpy. |
Szymon Janc |
13 years ago |
23 files, +179, -277 |
| be8c5be8 |
core: Fix walking the list while removing elements
If we are walking a GSList and remove the element we are pointing to,
the next iteration g_slist_next() will access previously freed
memory. |
Lucas De Marchi |
13 years ago |
1 file, +3, -2 |
| fc67e0ca |
core: Fix leaking connection list nodes
==480== HEAP SUMMARY:
==480== in use at exit: 62,418 bytes in 355 blocks
==480== total heap usage: 11,134 allocs, 10,779 frees, 5,254,068 bytes allocated
==480==
==480== 16 bytes in 1 blocks are definitely lost in loss record 70 of 250
==480== at 0x4C2C04B: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==480== by 0x4E80050: g_malloc (in /usr/lib/libglib-2.0.so.0.3200.4)
==480== by 0x4E94442: g_slice_alloc (in /usr/lib/libglib-2.0.so.0.3200.4)
==480== by 0x4E95792: g_slist_append (in /usr/lib/libglib-2.0.so.0.3200.4)
==480== by 0x17E483: adapter_add_connection (adapter.c:3245)
==480== by 0x187FDF: btd_event_conn_complete (event.c:470)
==480== by 0x18B72D: mgmt_event.part.36 (mgmt.c:515)
==480== by 0x4E7A474: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.3200.4)
==480== by 0x4E7A7A7: ??? (in /usr/lib/libglib-2.0.so.0.3200.4)
==480== by 0x4E7ABA1: g_main_loop_run (in /usr/lib/libglib-2.0.so.0.3200.4)
==480== by 0x1216B1: main (main.c:551) |
Lucas De Marchi |
13 years ago |
1 file, +2, -0 |
| f1ff6e99 |
audio: Remove unused function |
Chan-yeol Park |
13 years ago |
2 files, +0, -41 |
| 02dd8b9f |
mgmt: Add string for Passkey Notify Event |
Chan-yeol Park |
13 years ago |
1 file, +1, -0 |
| efc9185b |
core: Use DBus.Properties on Manager interface |
Lucas De Marchi |
13 years ago |
1 file, +25, -56 |
| c0c90936 |
audio: Use DBus.Properties on Control interface |
Lucas De Marchi |
13 years ago |
1 file, +18, -39 |
| 9f63f87a |
gdbus: Implement PropertiesChanged signal |
Lucas De Marchi |
13 years ago |
2 files, +109, -2 |
| 343c29cf |
gdbus: Simplify code for appending properties
This reuse append_properties for GetAll and GetManagedObjects |
Luiz Augusto von Dentz |
13 years ago |
1 file, +2, -32 |
| dc46dc50 |
gdbus: Integrates ObjectManager with Properties interface
This appends the properties and its values when using ObjectManager. |
Luiz Augusto von Dentz |
13 years ago |
1 file, +27, -1 |
| e20532b7 |
gdbus: Only export ObjectManager interface on root path
ObjectManager should be exported only in the root path and list all
the children paths. |
Luiz Augusto von Dentz |
13 years ago |
1 file, +15, -2 |
| 3cfba3f7 |
gdbus: Group interface changes to reduce the amount of signals emitted
InterfacesAdded and InterfacesRemoved can group all the interfaces
changes together in one message. |
Luiz Augusto von Dentz |
13 years ago |
1 file, +208, -154 |
| b487ef05 |
gdbus: Add support for org.freedesktop.DBus.ObjectManager interface
This implements initial support for ObjectManager, it automatically adds
objects to its parents so no action is needed by daemons to get their
objects managed by this interface.
ObjectManager is part of D-Bus spec since revision 0.17:
http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager |
Luiz Augusto von Dentz |
13 years ago |
1 file, +237, -10 |
| 21de7d71 |
gdbus: Add properties into Introspectable interface |
Lucas De Marchi |
13 years ago |
1 file, +19, -0 |
| 913a9015 |
gdbus: Implement DBus.Properties.Set method
Contrary to Get() and GetAll(), Set() is asynchronous so we pass an id
to the setter so later it can declare the Set() as successful or
otherwise. |
Lucas De Marchi |
13 years ago |
2 files, +157, -1 |
| 2b75d65a |
gdbus: Implement DBus.Properties.GetAll method |
Lucas De Marchi |
13 years ago |
1 file, +55, -1 |
| c374734a |
gdbus: Implement DBus.Properties.Get method |
Lucas De Marchi |
13 years ago |
2 files, +69, -1 |
| a5b71bdd |
gdbus: Add skeleton of DBus.Properties interface
This interface is responsible for handling properties of all objects in
a given path. Right now it only registers itself, doing nothing useful.
A conversion to this new layout will be done by subsequent patches.
org.freedesktop.org.DBus.Properties spec can be found at
http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties |
Lucas De Marchi |
13 years ago |
1 file, +46, -0 |
| 312d738e |
gdbus: Use macros to add annotations
Besides being more readable this way it avoids going over 80 chars. |
Lucas De Marchi |
13 years ago |
1 file, +28, -12 |
| 7084f0ba |
gdbus: Move typedefs up
Move the typedefs up so they can be used by functions and callbacks. |
Lucas De Marchi |
13 years ago |
1 file, +29, -18 |