From: Marc Fournier Date: Thu, 18 Jul 2013 10:07:35 +0000 (+0200) Subject: libmnl: fix 2 mistakes preventing building with --enable-debug X-Git-Tag: collectd-5.4.0~11^2~10 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=3b44cc54056c45e8a4214b60319dfbfada91b423;p=collectd.git libmnl: fix 2 mistakes preventing building with --enable-debug --- diff --git a/src/netlink.c b/src/netlink.c index 59c21cce..0c06e78a 100644 --- 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; - 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) @@ -397,6 +389,14 @@ static int qos_filter_cb (const struct nlmsghdr *nlh, void *args) 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)) { @@ -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).", - tc_type, dev, msg->tcm_ifindex); + tc_type, dev, tm->tcm_ifindex); if (check_ignorelist (dev, tc_type, tc_inst)) return MNL_CB_OK;