Commit Graph

6 Commits

Author SHA1 Message Date
Matthias Schiffer 8346980194
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-17 16:07:49 +02:00
Matthias Schiffer 1b03325c01
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-17 16:07:41 +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
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 e8cc8eeee6 Add package respondd-module-airtime (#156)
See README.md for more information.
2016-12-22 23:40:00 +01:00