Fix a bug in netlist where glibtop_netlist.number was never initialized to
* Makefile.am: * cpu.c: (glibtop_get_cpu_p): * netlist.c: (glibtop_get_netlist_s): * netload.c: (glibtop_get_netload_p): * procmem.c: (glibtop_get_proc_mem_p): Fix a bug in netlist where glibtop_netlist.number was never initialized to 0 (this resulted in a NULL pointer dereference in the network load feature of the multiload applet) * Add support for getting interface flags and packet counts even on interfaces without IP addresses (needed for the network load feature of the multiload applet) * Restore per-process limits in the !FreeBSD or __FreeBSD_version < 500013 case * Add CPU interrupt time as IOWAIT to get support for the cpu load feature of the multiload applet. Patch from marcus@freebsd.org (Joe Marcus Clarke). Closes #168704.
This commit is contained in:
@@ -43,6 +43,10 @@ glibtop_get_netlist_s (glibtop *server, glibtop_netlist *buf)
|
||||
struct if_nameindex *ifstart, *ifs;
|
||||
GPtrArray *devices;
|
||||
|
||||
glibtop_init_s (&server, GLIBTOP_SYSDEPS_NETLIST, 0);
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_netlist));
|
||||
|
||||
ifs = ifstart = if_nameindex();
|
||||
|
||||
devices = g_ptr_array_new();
|
||||
|
||||
Reference in New Issue
Block a user