projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a980419
)
libmnl: fix 2 mistakes preventing building with --enable-debug
author
Marc Fournier
<marc.fournier@camptocamp.com>
Thu, 18 Jul 2013 10:07:35 +0000
(12:07 +0200)
committer
Marc Fournier
<marc.fournier@camptocamp.com>
Thu, 18 Jul 2013 10:07:35 +0000
(12:07 +0200)
src/netlink.c
patch
|
blob
|
history
diff --git
a/src/netlink.c
b/src/netlink.c
index
59c21cc
..
0c06e78
100644
(file)
--- a/
src/netlink.c
+++ b/
src/netlink.c
@@
-376,14
+376,6
@@
static int qos_filter_cb (const struct nlmsghdr *nlh, void *args)
int __attribute__((unused)) stats_submitted = 0;
int __attribute__((unused)) stats_submitted = 0;
- if (tm->tcm_ifindex != wanted_ifindex)
- {
- DEBUG ("netlink plugin: qos_filter_cb: Got %s for interface #%i, "
- "but expected #%i.",
- tc_type, msg->tcm_ifindex, wanted_ifindex);
- return MNL_CB_OK;
- }
-
if (nlh->nlmsg_type == RTM_NEWQDISC)
tc_type = "qdisc";
else if (nlh->nlmsg_type == RTM_NEWTCLASS)
if (nlh->nlmsg_type == RTM_NEWQDISC)
tc_type = "qdisc";
else if (nlh->nlmsg_type == RTM_NEWTCLASS)
@@
-397,6
+389,14
@@
static int qos_filter_cb (const struct nlmsghdr *nlh, void *args)
return MNL_CB_ERROR;
}
return MNL_CB_ERROR;
}
+ if (tm->tcm_ifindex != wanted_ifindex)
+ {
+ DEBUG ("netlink plugin: qos_filter_cb: Got %s for interface #%i, "
+ "but expected #%i.",
+ tc_type, tm->tcm_ifindex, wanted_ifindex);
+ return MNL_CB_OK;
+ }
+
if ((tm->tcm_ifindex >= 0)
&& ((size_t) tm->tcm_ifindex >= iflist_len))
{
if ((tm->tcm_ifindex >= 0)
&& ((size_t) tm->tcm_ifindex >= iflist_len))
{
@@
-449,7
+449,7
@@
static int qos_filter_cb (const struct nlmsghdr *nlh, void *args)
}
DEBUG ("netlink plugin: qos_filter_cb: got %s for %s (%i).",
}
DEBUG ("netlink plugin: qos_filter_cb: got %s for %s (%i).",
- tc_type, dev,
msg
->tcm_ifindex);
+ tc_type, dev,
tm
->tcm_ifindex);
if (check_ignorelist (dev, tc_type, tc_inst))
return MNL_CB_OK;
if (check_ignorelist (dev, tc_type, tc_inst))
return MNL_CB_OK;