aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2016-02-09 16:41:44 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2016-02-09 16:48:33 +0200
commitb269c219ded102477601fe77be53caf7d3d58f96 (patch)
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.
-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,
647 static uint8_t null_key[SHA256_LEN]; 647 static uint8_t null_key[SHA256_LEN];
648 648
649 child = node_alloc(null_key, parent); 649 child = node_alloc(null_key, parent);
650 child->busy = 0;
650 nodes[ord] = child; 651 nodes[ord] = child;
651 } 652 }
652 return child; 653 return child;
@@ -1019,15 +1020,16 @@ log_node(struct node *node, void *data)
1019 char kbuf[2*SHA256_LEN+1]; 1020 char kbuf[2*SHA256_LEN+1];
1020 key_to_str(node->key, kbuf); 1021 key_to_str(node->key, kbuf);
1021#ifdef DEBUG 1022#ifdef DEBUG
1022 syslog(tc->prio, "%d: %p(%p,%p): %"PRIu32" %s: %s", tc->num, node, 1023 syslog(tc->prio, "%"PRIu32": %p(%p,%p): %"PRIu32" %s: %s", tc->num, node,
1023 node->child[CHILD_LEFT], node->child[CHILD_RIGHT], node->ord, 1024 node->child[CHILD_LEFT], node->child[CHILD_RIGHT], node->ord,
1024 kbuf, 1025 kbuf,
1025 node->keystr); 1026 node->keystr);
1026#else 1027#else
1027 syslog(tc->prio, "%d: %p(%p,%p): %"PRIu32" %s", tc->num, node, 1028 syslog(tc->prio, "%"PRIu32": %p(%p,%p): %"PRIu32" %s", tc->num, node,
1028 node->child[CHILD_LEFT], node->child[CHILD_RIGHT], node->ord, 1029 node->child[CHILD_LEFT], node->child[CHILD_RIGHT], node->ord,
1029 kbuf); 1030 kbuf);
1030#endif 1031#endif
1032 ++tc->num;
1031} 1033}
1032 1034
1033 1035

Return to:

Send suggestions and report system problems to the System administrator.