small adjustments to plugin_tc.c
according to @ktsaou comments.
Stefan Forstenlechner committed
Jan 17, 2017 at 17:07 UTC
afa8a5eb2320f7d8156e6e66c19f65b87095197f
1 file changed
+2
-2
src/plugin_tc.c
+2
-2
@@ -247,7 +247,7 @@ static inline void tc_device_commit(struct tc_device *d) {
247
// we need the root qdisc
248
for(c = d->classes ; c ; c = c->next) {
249
// debug(D_TC_LOOP, "TC: Device '%s', class '%s', isLeaf=%d, HasParent=%d, Seen=%d", d->name?d->name:d->id, c->name?c->name:c->id, c->isleaf, c->hasparent, c->seen);
250
- debug(D_TC_LOOP, "TC: Device '%s', class '%s', isleaf=%s, isqdisc=%s, hasparent=%s bytes=%d, packtes=%d, dropped=%d, tokens=%d, ctokens=%d", d->name?d->name:d->id, c->name?c->name:c->id, c->isleaf?"true":"false", c->isqdisc?"true":"false", c->hasparent?"true":"false", c->bytes, c->packets, c->dropped, c->tokens, c->ctokens);
250
+ debug(D_TC_LOOP, "TC: Device '%s', class '%s', isleaf=%s, isqdisc=%s, hasparent=%s bytes=%llu, packtes=%llu, dropped=%llu, tokens=%llu, ctokens=%llu", d->name?d->name:d->id, c->name?c->name:c->id, c->isleaf?"true":"false", c->isqdisc?"true":"false", c->hasparent?"true":"false", c->bytes, c->packets, c->dropped, c->tokens, c->ctokens);
251
if(unlikely(c->updated && c->isqdisc && !c->parentid)) {
252
active_qos = 1;
253
bytes_sum = c->bytes;
@@ -846,7 +846,7 @@ void *tc_main(void *ptr) {
846
char *leafid = words[6]; // leafid
847
char qdisc = 0;
848
849
- if(strcmp(words[0], "qdisc") == 0) {
849
+ if(first_hash == QDISC_HASH) {
850
qdisc = 1;
851
}
852
if(strcmp(parent, "root") == 0) {