summaryrefslogtreecommitdiff
path: root/lib/xref.c
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2021-11-11 08:08:19 -0500
committerGitHub <noreply@github.com>2021-11-11 08:08:19 -0500
commiteda02ab9da1ba02199ba85d203bdbd6a6e9050b1 (patch)
tree1fcbfcb7ab7459671d4479a6be7aac3216fd82d0 /lib/xref.c
parent83323dbf00168153b233c0d34ecb15168b3de9b7 (diff)
parentafb8fe93b1cf1e44c15fc0e65c18eda67cc04da2 (diff)
Merge pull request #10025 from opensourcerouting/xref-backtrace
lib: backtraces for specific log messages
Diffstat (limited to 'lib/xref.c')
-rw-r--r--lib/xref.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/xref.c b/lib/xref.c
index a41f91a228..0d3549d062 100644
--- a/lib/xref.c
+++ b/lib/xref.c
@@ -35,6 +35,8 @@
struct xref_block *xref_blocks;
static struct xref_block **xref_block_last = &xref_blocks;
+struct xrefdata_uid_head xrefdata_uid = INIT_RBTREE_UNIQ(xrefdata_uid);
+
static void base32(uint8_t **inpos, int *bitpos,
char *out, size_t n_chars)
{
@@ -109,6 +111,8 @@ static void xref_add_one(const struct xref *xref)
base32(&h, &bitpos, &xrefdata->uid[0], 5);
xrefdata->uid[5] = '-';
base32(&h, &bitpos, &xrefdata->uid[6], 5);
+
+ xrefdata_uid_add(&xrefdata_uid, xrefdata);
}
void xref_gcc_workaround(const struct xref *xref)