Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 115806 | Differences between
and this patch

Collapse All | Expand All

(-)rpc.rstatd-4.0.1/getdata.c (-5 / +6 lines)
Lines 201-206 Link Here
201
	fgets(buf, sizeof(buf), fp);
201
	fgets(buf, sizeof(buf), fp);
202
	fgets(buf, sizeof(buf), fp);
202
	fgets(buf, sizeof(buf), fp);
203
203
204
	stats->if_ipackets = 0;
205
	stats->if_ierrors = 0;
206
	stats->if_opackets = 0;
207
	stats->if_oerrors = 0;
208
	stats->if_collisions = 0;
209
204
	/* add up data from all interfaces besides the loopback interface.
210
	/* add up data from all interfaces besides the loopback interface.
205
	If interfaces where specified on the commandline take only these. */
211
	If interfaces where specified on the commandline take only these. */
206
	while (fgets(buf, sizeof(buf), fp)) {
212
	while (fgets(buf, sizeof(buf), fp)) {
Lines 241-251 Link Here
241
			}
247
			}
242
		}
248
		}
243
		/* skip lo interfaces */
249
		/* skip lo interfaces */
244
		stats->if_ipackets = 0;
245
		stats->if_ierrors = 0;
246
		stats->if_opackets = 0;
247
		stats->if_oerrors = 0;
248
		stats->if_collisions = 0;
249
		if ((ninterfaces == 0 && strcmp(iface, "lo") != 0) ||
250
		if ((ninterfaces == 0 && strcmp(iface, "lo") != 0) ||
250
			found_interface) {
251
			found_interface) {
251
			stats->if_ipackets += if_ipackets;
252
			stats->if_ipackets += if_ipackets;

Return to bug 115806