summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2016-02-09 14:41:44 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2016-02-09 14:48:33 (GMT)
commitb269c219ded102477601fe77be53caf7d3d58f96 (patch) (side-by-side diff)
tree194ae6f66222f11fbbfaa993b71d2e44a7c8d174
parent0d1cc96f3b478393a6a1b3c99fe5ebcca26cadcb (diff)
downloadvmod-tbf-b269c219ded102477601fe77be53caf7d3d58f96.tar.gz
vmod-tbf-b269c219ded102477601fe77be53caf7d3d58f96.tar.bz2
Bugfixes
* src/tbf.c (new_node): Reset busy flag. (log_node): Fix specifiers. Increase tc->num.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--src/tbf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tbf.c b/src/tbf.c
index 401e29d..3aefad6 100644
--- a/src/tbf.c
+++ b/src/tbf.c
@@ -647,6 +647,7 @@ new_node(struct node **nodes, struct dump_header *hdr,
static uint8_t null_key[SHA256_LEN];
child = node_alloc(null_key, parent);
+ child->busy = 0;
nodes[ord] = child;
}
return child;
@@ -1019,15 +1020,16 @@ log_node(struct node *node, void *data)
char kbuf[2*SHA256_LEN+1];
key_to_str(node->key, kbuf);
#ifdef DEBUG
- syslog(tc->prio, "%d: %p(%p,%p): %"PRIu32" %s: %s", tc->num, node,
+ syslog(tc->prio, "%"PRIu32": %p(%p,%p): %"PRIu32" %s: %s", tc->num, node,
node->child[CHILD_LEFT], node->child[CHILD_RIGHT], node->ord,
kbuf,
node->keystr);
#else
- syslog(tc->prio, "%d: %p(%p,%p): %"PRIu32" %s", tc->num, node,
+ syslog(tc->prio, "%"PRIu32": %p(%p,%p): %"PRIu32" %s", tc->num, node,
node->child[CHILD_LEFT], node->child[CHILD_RIGHT], node->ord,
kbuf);
#endif
+ ++tc->num;
}

Return to:

Send suggestions and report system problems to the System administrator.