projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
adbba9f
)
More fixing of netlink build with different HAVE_...
author
Andreas Henriksson
<andreas@fatal.se>
Mon, 10 Jun 2013 21:26:19 +0000
(23:26 +0200)
committer
Marc Fournier
<marc.fournier@camptocamp.com>
Thu, 18 Jul 2013 10:04:23 +0000
(12:04 +0200)
src/netlink.c
patch
|
blob
|
history
diff --git
a/src/netlink.c
b/src/netlink.c
index
65fc0d9
..
59c21cc
100644
(file)
--- a/
src/netlink.c
+++ b/
src/netlink.c
@@
-374,7
+374,7
@@
static int qos_filter_cb (const struct nlmsghdr *nlh, void *args)
char *tc_type;
char tc_inst[DATA_MAX_NAME_LEN];
char *tc_type;
char tc_inst[DATA_MAX_NAME_LEN];
- int __attribute__((unused)) stats_
foun
d = 0;
+ int __attribute__((unused)) stats_
submitte
d = 0;
if (tm->tcm_ifindex != wanted_ifindex)
{
if (tm->tcm_ifindex != wanted_ifindex)
{
@@
-471,20
+471,19
@@
static int qos_filter_cb (const struct nlmsghdr *nlh, void *args)
mnl_attr_parse_nested(attr, qos_attr_cb, &bs);
if (bs != NULL)
mnl_attr_parse_nested(attr, qos_attr_cb, &bs);
if (bs != NULL)
- stats_found = 1;
+ {
+ char type_instance[DATA_MAX_NAME_LEN];
- break;
- }
+ stats_submitted = 1;
- if (stats_found)
- {
- char type_instance[DATA_MAX_NAME_LEN];
+ ssnprintf (type_instance, sizeof (type_instance), "%s-%s",
+ tc_type, tc_inst);
- ssnprintf (type_instance, sizeof (type_instance), "%s-%s",
- tc_type, tc_inst);
+ submit_one (dev, "ipt_bytes", type_instance, bs->bytes);
+ submit_one (dev, "ipt_packets", type_instance, bs->packets);
+ }
- submit_one (dev, "ipt_bytes", type_instance, bs->bytes);
- submit_one (dev, "ipt_packets", type_instance, bs->packets);
+ break;
}
#endif /* TCA_STATS2 */
}
#endif /* TCA_STATS2 */
@@
-503,7
+502,7
@@
static int qos_filter_cb (const struct nlmsghdr *nlh, void *args)
}
ts = mnl_attr_get_payload(attr);
}
ts = mnl_attr_get_payload(attr);
- if (!stats_
foun
d && ts != NULL)
+ if (!stats_
submitte
d && ts != NULL)
{
char type_instance[DATA_MAX_NAME_LEN];
{
char type_instance[DATA_MAX_NAME_LEN];