always init interface list for stats
This commit is contained in:
parent
9414b07011
commit
8bc0f0d245
|
@ -1729,11 +1729,9 @@ int sigar_net_interface_stat_get(sigar_t *sigar, const char *name,
|
|||
ifmsg_iter_t iter;
|
||||
struct if_msghdr *ifm;
|
||||
|
||||
if (sigar->ifconf_len == 0) {
|
||||
if ((status = sigar_ifmsg_init(sigar)) != SIGAR_OK) {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
||||
iter.type = IFMSG_ITER_GET;
|
||||
iter.name = name;
|
||||
|
|
Loading…
Reference in New Issue