--- projects/libstatgrab/src/libstatgrab/network_stats.c 2006/10/09 14:09:38 1.78 +++ projects/libstatgrab/src/libstatgrab/network_stats.c 2006/10/09 17:23:07 1.79 @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * 02111-1307 USA * - * $Id: network_stats.c,v 1.78 2006/10/09 14:09:38 tdb Exp $ + * $Id: network_stats.c,v 1.79 2006/10/09 17:23:07 tdb Exp $ */ #ifdef HAVE_CONFIG_H @@ -235,6 +235,13 @@ sg_network_io_stats *sg_get_network_io_stats(int *entr } network_stat_ptr=network_stats+interfaces; + /* Read interface name */ + if (sg_update_string(&network_stat_ptr->interface_name, + ksp->ks_name) < 0) { + kstat_close(kc); + return NULL; + } + /* Finish reading rx */ network_stat_ptr->rx=knp->VALTYPE; @@ -274,12 +281,6 @@ sg_network_io_stats *sg_get_network_io_stats(int *entr } network_stat_ptr->collisions=knp->value.ui32; - /* Read interface name */ - if (sg_update_string(&network_stat_ptr->interface_name, - ksp->ks_name) < 0) { - kstat_close(kc); - return NULL; - } /* Store systime */ network_stat_ptr->systime=time(NULL);