libpcp_web: JSON API coding consistency, small improvements and fixes
Mainly work on the iterable routine to get the callback to match the
simpler semantics of read(2) as originally intended. Rename routine
for the long-term, as the former was too much of a mouthful (my poor
naming choice earlier). Update and use the typedef that was earlier
added to pmjson.h for callback function.
Fix compiler warning - json_helpers.c:376:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
int fd = (int)extra;
Fix memleak of buffers in several locations. Numerous cleanups in
terms of using static routines, switching pmdaroot over to pmjsonGet
use and use fread since its using that sort of file I/O not fds, and
so on. Make variable names shorter sometimes for better code layout
and consistency with rest of PCP, without losing clarity I hope.
Fixed typo in the libpcp_web exports file. Update the pmjson(3) man
page as it was out of date in some places before starting tidying,
but also add in the new API tweaks there.
12 files changed: