summaryrefslogtreecommitdiff
path: root/src/rfkill.c
Commit message (Collapse)AuthorAgeFilesLines
* adapter: Keep track of whether the adapter is rfkill'edBastien Nocera2022-09-011-23/+66
| | | | | | Instead of only replying to D-Bus requests with an error saying the adapter is blocked, keep track of the rfkill being enabled or disabled so we know the rfkill state of the adapter at all times.
* rfkill: Fix reading from rfkill socketBenjamin Berg2021-06-231-13/+11
| | | | | | | | | | | | The kernel will always send exactly one event, but the size of the passed struct will depend on the length of the submitted read() and the kernel version. i.e. the interface can be extended and we need to expect for a read to be longer than expected if we ask for it. Fix this by only requesting the needed length and explicitly check the length against the V1 version of the structure to make the code a bit more future proof in case the internal copy of the struct is updated to contain new fields.
* core: Rename hcid.h to btd.hLuiz Augusto von Dentz2020-10-291-1/+1
| | | | | Since we use btd term for daemon APIs it makes sense to use it also for the header name instead of hcid.
* src: Add SPDX License IdentifierTedd Ho-Jeong An2020-09-211-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds SPDX License Identifier and removes the license text. ------------------------------------- License COUNT ------------------------------------- LGPL-2.1-or-later : 62 GPL-2.0-or-later : 51 BSD-2-Clause : 2 License: LGPL-2.1-or-later src/adv_monitor.c src/adv_monitor.h src/shared/mainloop-glib.c src/shared/btp.c src/shared/tester.c src/shared/btsnoop.c src/shared/gatt-helpers.h src/shared/log.h src/shared/util.h src/shared/mainloop-ell.c src/shared/hci-crypto.c src/shared/mainloop.c src/shared/hfp.h src/shared/mainloop-notify.c src/shared/io-mainloop.c src/shared/btsnoop.h src/shared/uhid.h src/shared/util.c src/shared/ringbuf.c src/shared/btp.h src/shared/shell.h src/shared/io-glib.c src/shared/queue.h src/shared/gatt-server.h src/shared/crypto.c src/shared/crypto.h src/shared/io-ell.c src/shared/timeout-glib.c src/shared/mgmt.c src/shared/gatt-db.c src/shared/mainloop-notify.h src/shared/hfp.c src/shared/timeout-ell.c src/shared/shell.c src/shared/hci.c src/shared/log.c src/shared/ringbuf.h src/shared/gatt-helpers.c src/shared/queue.c src/shared/tty.h src/shared/timeout-mainloop.c src/shared/tester.h src/shared/gap.h src/shared/mgmt.h src/shared/gatt-db.h src/shared/uhid.c src/shared/mainloop.h src/shared/timeout.h src/shared/att-types.h src/shared/pcap.c src/shared/gap.c src/shared/att.c src/shared/pcap.h src/shared/hci.h src/shared/gatt-client.h src/shared/io.h src/shared/gatt-client.c src/shared/ad.c src/shared/att.h src/shared/gatt-server.c src/shared/hci-crypto.h src/shared/ad.h License: GPL-2.0-or-later src/attrib-server.h src/advertising.h src/textfile.c src/attrib-server.c src/uinput.h src/log.h src/eir.h src/sdpd.h src/sdpd-request.c src/service.h src/sdpd-database.c src/adapter.h src/plugin.h src/uuid-helper.h src/plugin.c src/main.c src/sdp-xml.c src/error.h src/oui.c src/device.c src/agent.h src/sdp-client.c src/oui.h src/device.h src/gatt-database.c src/error.c src/backtrace.c src/sdpd-server.c src/adapter.c src/log.c src/agent.c src/backtrace.h src/sdp-xml.h src/hcid.h src/dbus-common.h src/uuid-helper.c src/storage.c src/profile.c src/advertising.c src/storage.h src/dbus-common.c src/profile.h src/sdpd-service.c src/eir.c src/sdp-client.h src/gatt-database.h src/gatt-client.h src/rfkill.c src/gatt-client.c src/service.c src/textfile.h License: BSD-2-Clause src/shared/ecc.h src/shared/ecc.c
* build: Move declaration of _GNU_SOURCE back into individual source filesMarcel Holtmann2018-12-061-0/+1
|
* core: Use local libbluetooth includesMarcel Holtmann2015-02-281-0/+3
|
* rfkill: Fix count parameter in readJaganath Kanakkassery2013-01-041-1/+1
| | | | | Since g_str_has_prefix() has been used with the output buffer of read it should be nul terminated
* core: Prefer adapter_find functions over manager onesJohan Hedberg2013-01-031-2/+1
|
* core: Remove persistent storing of the powered stateJohan Hedberg2012-12-131-3/+0
|
* Revert "Ensure config.h is included by using CPPFLAGS"Johan Hedberg2012-12-071-0/+4
| | | | | | | | | | | | | | 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
* Ensure config.h is included by using CPPFLAGSLucas De Marchi2012-12-051-4/+0
| | | | | | | | | | 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.
* rfkill: Fix memory leak in rfkill_exitSzymon Janc2012-12-031-8/+10
| | | | | | | | | | | | | | | | | | | | | | | g_io_add_watch increase channel ref count but g_io_channel_shutdown doesn't drop reference nor remove watch. Since close on unref is set for channel and it is watch we are interested keep watch id and not channel id and remove watch on exit. 120 bytes in 1 blocks are still reachable in loss record 181 of 235 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 0x167B8D: rfkill_init (rfkill.c:157) by 0x1215E4: main (main.c:540) 6 bytes in 1 blocks are still reachable in loss record 12 of 235 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 0x4E6CF95: g_io_channel_init (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x4EB66FF: g_io_channel_unix_new (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.3) by 0x167B8D: rfkill_init (rfkill.c:157) by 0x1215E4: main (main.c:540)
* Fix use of deprecated glib on coreLuiz Augusto von Dentz2011-01-191-5/+6
|
* Add manager_foreach_adapter()Johan Hedberg2010-12-191-1/+1
| | | | | Ultimately manager_get_adapters shouldn't be needed at all. By introducing manager_foreach_adapter most instances can be removed.
* Move debug() to DBG()Gustavo F. Padovan2010-05-211-2/+2
| | | | Use the new dynamic debug feature
* Move logging.{c,h} to log.{c,h}Gustavo F. Padovan2010-05-211-1/+1
| | | | Try to make log stuff more similar to ConnMan and oFono.
* Update copyright informationMarcel Holtmann2010-01-011-1/+1
|
* When RFKILL is unblocked restore the previous power settingMarcel Holtmann2009-07-311-0/+2
|
* Add skeleton for RFKILL supportMarcel Holtmann2009-07-291-0/+170