| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Add btd_adapter_get_pairable and remove pairable argument from
btd_adapter_get_mode. Use btd_adapter_get_pairable to get pairable
state where needed.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 8a03376544b046a84301847d1594f6c3674983ff.
The patch needs to be split up and the gdbus/ changes were bogus
compared to the original commit message.
Conflicts:
Makefile.am
Makefile.obexd
profiles/cyclingspeed/cyclingspeed.c
profiles/heartrate/heartrate.c
src/error.c
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Instead of trying to include config.h in each file over the tree and
possibly forgetting to include it, give a "-include config.h" argument
to the compiler so it's guaranteed that a) it will be included for all
source files and b) it will be the first header included.
gdbus/ directory is left out, since it would break other projects using
it.
|
| |
|
| |
|
|
|
|
| |
This also make error reporting code compliant with convention used.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes adaptername plugin properly cleanup its fds on exit. Fixes
following warnings from valgrind:
16 bytes in 1 blocks are still reachable in loss record 42 of 221
at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x4E7FA78: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4E92CA2: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4E93ABD: g_slist_prepend (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4E78350: g_source_add_poll (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4EB5E32: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4E6D0C3: g_io_add_watch_full (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x1565FA: adaptername_init (adaptername.c:302)
by 0x1712AB: plugin_init (plugin.c:217)
by 0x1215D2: main (main.c:544)
18 bytes in 1 blocks are still reachable in loss record 58 of 221
at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x4E7FA78: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4E942DD: g_strdup (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4E78A69: g_source_set_name (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4EB5E0B: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4E6D0C3: g_io_add_watch_full (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x1565FA: adaptername_init (adaptername.c:302)
by 0x1712AB: plugin_init (plugin.c:217)
by 0x1215D2: main (main.c:544)
32 bytes in 1 blocks are still reachable in loss record 86 of 221
at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x4E7FA78: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4E78722: g_source_set_callback (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4E6D0DB: g_io_add_watch_full (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x1565FA: adaptername_init (adaptername.c:302)
by 0x1712AB: plugin_init (plugin.c:217)
by 0x1215D2: main (main.c:544)
32 bytes in 1 blocks are still reachable in loss record 87 of 221
at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x4E7FA78: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4E92CA2: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4E77285: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4E775AF: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4E78115: g_source_attach (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4E6D0E5: g_io_add_watch_full (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x1565FA: adaptername_init (adaptername.c:302)
by 0x1712AB: plugin_init (plugin.c:217)
by 0x1215D2: main (main.c:544)
120 bytes in 1 blocks are still reachable in loss record 167 of 221
at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x4E7FA78: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4EB66F4: g_io_channel_unix_new (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x1565A9: adaptername_init (adaptername.c:298)
by 0x1712AB: plugin_init (plugin.c:217)
by 0x1215D2: main (main.c:544)
120 bytes in 1 blocks are still reachable in loss record 168 of 221
at 0x4C29DB4: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x4E7FAE0: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4E78044: g_source_new (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4EB5DF9: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x4E6D0C3: g_io_add_watch_full (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3)
by 0x1565FA: adaptername_init (adaptername.c:302)
by 0x1712AB: plugin_init (plugin.c:217)
by 0x1215D2: main (main.c:544)
|
|
|
|
|
|
|
|
|
| |
The Nintendo Wii Remote Plus uses a new product ID and name. To detect
them properly, we need to add them to the wiimote-module.
To avoid an overlong "if" statement, this converts the match-function to
walk over an array and check all VID/PID pairs and device-names. This
makes adding new devices much easier.
|
|
|
|
|
| |
Remove callback is called only if it is not NULL so there is no need to
register empty callback function.
|
|
|
|
|
| |
Remove callback is called only if it is not NULL so there is no need to
register empty callback function.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This seems to be what plugins expect as only dbusoob explicite called
its remove function before unregistering adapter drivers.
This results in cleaner shutdown path:
Without patch:
bluetoothd[13563]: src/mgmt.c:mgmt_remove_uuid() index 0
bluetoothd[13563]: src/adapter.c:btd_adapter_unref() 0x606b2a0: ref=4
bluetoothd[13563]: src/adapter.c:btd_adapter_unref() 0x606b2a0: ref=3
bluetoothd[13563]: Stopping SDP server
bluetoothd[13563]: Exit
==13563==
==13563== HEAP SUMMARY:
==13563== in use at exit: 64,908 bytes in 395 blocks
==13563== total heap usage: 7,035 allocs, 6,640 frees, 4,432,371 bytes allocated
==13563==
==13563== LEAK SUMMARY:
==13563== definitely lost: 0 bytes in 0 blocks
==13563== indirectly lost: 0 bytes in 0 blocks
==13563== possibly lost: 17,429 bytes in 169 blocks
==13563== still reachable: 47,479 bytes in 226 blocks
==13563== suppressed: 0 bytes in 0 blocks
With patch:
bluetoothd[13301]: src/mgmt.c:mgmt_remove_uuid() index 0
bluetoothd[13301]: src/adapter.c:btd_adapter_unref() 0x606b2a0: ref=1
bluetoothd[13301]: src/adapter.c:btd_adapter_unref() 0x606b2a0: ref=0
bluetoothd[13301]: src/adapter.c:adapter_free() 0x606b2a0
bluetoothd[13301]: Stopping SDP server
bluetoothd[13301]: Exit
==13301==
==13301== HEAP SUMMARY:
==13301== in use at exit: 64,954 bytes in 348 blocks
==13301== total heap usage: 7,247 allocs, 6,899 frees, 4,625,672 bytes allocated
==13301==
==13301== LEAK SUMMARY:
==13301== definitely lost: 0 bytes in 0 blocks
==13301== indirectly lost: 0 bytes in 0 blocks
==13301== possibly lost: 17,334 bytes in 150 blocks
==13301== still reachable: 47,620 bytes in 198 blocks
==13301== suppressed: 0 bytes in 0 blocks
|
| |
|
|
|
|
|
|
|
|
| |
As soon as we have info related to a new device,
device object will be created if it does not exist yet.
Change check_device() to use this device object and
remove call to adapter_remove_device() in it.
|
| |
|
|
|
|
|
|
|
| |
Read local OOB data for RequestOOB reply only if remote also provided
hash and randomizer in EIR. This will allow for faster reply when only
discovery is done OOB. It is also required to pass NFC handover test
related to Bluetooth just-works pairing.
|
|
|
|
|
|
|
| |
This adds support for parsing nokia.com:bt type supported by some Nokia
NFC enabled devices. This is not fully documented Nokia extension so
to keep implementation sane and simple only PushOOB method suports
this type so only static handover is possible.
|
|
|
|
| |
This will also be used by 'nokia.com:bt' handler.
|
|
|
|
|
| |
This results in returning error 'Disabled' instead of 'No such Device'.
Will allow neard to properly set power state of Bluetooth carrier.
|
| |
|
|
|
|
|
|
| |
If device existed previously, it has been removed before calling of
btd_event_remote_name(), so this just update storage cache and name
property change of device object is not emitted.
|
|
|
|
|
|
|
|
|
|
|
| |
With recent change on how new device objects are created it is no
longer possible to create device object from string with
org.bluez.Adapter interface. When adding OOB data for specified
address device object is created if it was not yet existing.
Path to object is returned in AddRemoteData to avoid need for extra
FindDevice() call on org.bluez.Adapter to get object maching specified
address.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
| |
Mark all input only bdaddr_t pointer parameters as const.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
This function is used by neard to request data to be transmitted over
OOB channel. It also allows neard to provide data to be used in OOB
pairing without initializing pairing it self.
|