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