From 1dd3b3c9aac524375b3ed62ab7daac6a15a7a14d Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Tue, 21 Dec 2021 18:09:15 +0000 Subject: [PATCH] More logging reduction and a trace fix. git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3692 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- src/ssb.c | 2 +- src/ssb.js.c | 1 - src/trace.c | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ssb.c b/src/ssb.c index 367b6f4f..8b706c21 100644 --- a/src/ssb.c +++ b/src/ssb.c @@ -1973,7 +1973,7 @@ static bool _tf_ssb_parse_broadcast(const char* in_broadcast, tf_ssb_broadcast_t printf("pton failed\n"); } } - else + else if (strncmp(in_broadcast, "ws:", 3)) { printf("Unsupported broadcast: %s\n", in_broadcast); } diff --git a/src/ssb.js.c b/src/ssb.js.c index 9775c828..383a60a0 100644 --- a/src/ssb.js.c +++ b/src/ssb.js.c @@ -627,7 +627,6 @@ static JSValue _tf_ssb_add_event_listener(JSContext* context, JSValueConst this_ else if (strcmp(event_name, "message") == 0) { void* ptr = JS_VALUE_GET_PTR(JS_DupValue(context, callback)); - printf("add message listener %p\n", ptr); tf_ssb_add_message_added_callback(ssb, _tf_ssb_on_message_added_callback, _tf_ssb_cleanup_value, ptr); } else if (strcmp(event_name, "blob_want_added") == 0) diff --git a/src/trace.c b/src/trace.c index a680c9da..eafc9945 100644 --- a/src/trace.c +++ b/src/trace.c @@ -111,7 +111,7 @@ void tf_trace_begin(tf_trace_t* trace, const char* name) trace->stack = stack; } tf_trace_stack_t* stack = trace->stack; - while (stack->count == 0 && stack->next && stack->count + 1 > _countof(trace->stack->names)) + while (stack->count == 0 && stack->next && stack->next->count + 1 <= _countof(trace->stack->names)) { stack = stack->next; }