Commit Graph

14 Commits

Author SHA1 Message Date
Matthias Schiffer 52d7ac4aea respondd-module-airtime: move const specifier to the right location
GCC was warning that the second const was reduncant.
2021-10-25 00:09:01 +02:00
Matthias Schiffer 806703222f respondd-module-airtime: remove incorrect fprintf argument 2021-10-25 00:09:01 +02:00
Matthias Schiffer 1412236c09 respondd-module-airtime: remove PHY ID again
This ID is meaningless outside of a node itself, it is not necessarily
stable across reboots and upgrades, and there is nothing else in the
respondd data that this ID could be matched against. Remove it.

This reverts commit 8d53ff54e5 ("respondd-module-airtime: add idx").
2021-10-25 00:09:01 +02:00
Matthias Schiffer 1dd5cd1706 respondd-module-airtime: improve error handling
- Return either NL_OK or NL_STOP from callback
- Return the generated airtime entry from get_airtime()
2021-10-25 00:09:01 +02:00
David Bauer 825aa0c093 respondd-module-airtime: fix null pointer deref
In case a radio exists, but is disabled, the survey request will return
successfully, but without data.

The code could not handle this case, as the newest_element_index would
be negative in this case, leading to json_object_array_get_idx returning
a null-pointer.

Check for a null pointer prior adding the PHY index, avoiding a
null-pointer dereference.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-07-03 02:31:05 +02:00
aiyion.prime 8d53ff54e5 respondd-module-airtime: add idx
implements freifunk-gluon/gluon#2204
2021-04-22 20:23:49 +02:00
Tobias be2c357859 respondd-module-airtime: Fix reported noise result (#190)
The noise value delivered by nl80211 is actually a signed int8. Thus it
must be interpreted as a signed value, too.

Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
2018-07-08 20:10:17 +02:00
Matthias Schiffer 31e2000604
treewide: remove redundant definitions from package Makefiles 2018-03-07 20:51:48 +01:00
Jan-Philipp Litza 1a8fd4ba87 respondd-module-airtime: Give more helpful error messages 2017-04-30 18:03:40 +02:00
Jan-Philipp Litza 2e54ac8e17 respondd-module-airtime: Make returned object more dynamic
This fixes #157 and #158
2017-02-08 23:11:57 +01:00
Jan-Philipp Litza f0a50e70a2 respondd-module-airtime: Add allocation checks to get_ifaces() 2017-02-08 23:11:57 +01:00
Jan-Philipp Litza 7b56f09e0f respondd-module-airtime: Move common netlink query code to separate function 2017-02-08 23:11:57 +01:00
Matthias Schiffer d94f0f5956 respondd-module-airtime: install to /usr/lib/respondd instead of /lib/respondd 2016-12-22 23:42:00 +01:00
Jan-Philipp Litza e8cc8eeee6 Add package respondd-module-airtime (#156)
See README.md for more information.
2016-12-22 23:40:00 +01:00