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:41:44 (GMT)
commit4f576eefe3cfa72101fac551dd0e11cc9d5122d4 (patch) (unidiff)
treeb0960e95d97f5ef66946836ccdba24862e995c6e
parent6f873ac382cee705378972332c6f8eac4f166e3d (diff)
downloadvmod-tbf-4f576eefe3cfa72101fac551dd0e11cc9d5122d4.tar.gz
vmod-tbf-4f576eefe3cfa72101fac551dd0e11cc9d5122d4.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 7ac0ca3..4b1a77a 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;
@@ -1008,15 +1009,16 @@ log_node(struct node *node, void *data)
1008 char kbuf[2*SHA256_LEN+1]; 1009 char kbuf[2*SHA256_LEN+1];
1009 key_to_str(node->key, kbuf); 1010 key_to_str(node->key, kbuf);
1010#ifdef DEBUG 1011#ifdef DEBUG
1011 syslog(tc->prio, "%d: %p(%p,%p): %"PRIu32" %s: %s", tc->num, node, 1012 syslog(tc->prio, "%"PRIu32": %p(%p,%p): %"PRIu32" %s: %s", tc->num, node,
1012 node->child[CHILD_LEFT], node->child[CHILD_RIGHT], node->ord, 1013 node->child[CHILD_LEFT], node->child[CHILD_RIGHT], node->ord,
1013 kbuf, 1014 kbuf,
1014 node->keystr); 1015 node->keystr);
1015#else 1016#else
1016 syslog(tc->prio, "%d: %p(%p,%p): %"PRIu32" %s", tc->num, node, 1017 syslog(tc->prio, "%"PRIu32": %p(%p,%p): %"PRIu32" %s", tc->num, node,
1017 node->child[CHILD_LEFT], node->child[CHILD_RIGHT], node->ord, 1018 node->child[CHILD_LEFT], node->child[CHILD_RIGHT], node->ord,
1018 kbuf); 1019 kbuf);
1019#endif 1020#endif
1021 ++tc->num;
1020} 1022}
1021 1023
1022 1024

Return to:

Send suggestions and report system problems to the System administrator.