From d49089898f077796eea5fb75c3674c57db399cc1 Mon Sep 17 00:00:00 2001 From: default Date: Fri, 3 Feb 2023 16:51:59 +0100 Subject: [PATCH] Elevated debug level to bad user / invalid user messages. --- activitypub.c | 2 +- data.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/activitypub.c b/activitypub.c index 9c9ea7c..4f0e246 100644 --- a/activitypub.c +++ b/activitypub.c @@ -1235,7 +1235,7 @@ int activitypub_get_handler(d_char *req, char *q_path, uid = xs_list_get(l, 1); if (!user_open(&snac, uid)) { /* invalid user */ - srv_log(xs_fmt("activitypub_get_handler bad user %s", uid)); + srv_debug(1, xs_fmt("activitypub_get_handler bad user %s", uid)); return 404; } diff --git a/data.c b/data.c index da8d422..a5f46e8 100644 --- a/data.c +++ b/data.c @@ -155,6 +155,9 @@ int user_open(snac *snac, const char *uid) if ((f = fopen(cfg_file, "r")) != NULL) { xs *cfg_data; +// if (fileno(f) > 100) +// snac_log(snac, xs_fmt("CAUTION: fileno() > 100")); + /* read full config file */ cfg_data = xs_readall(f); fclose(f); @@ -186,7 +189,7 @@ int user_open(snac *snac, const char *uid) srv_debug(2, xs_fmt("error opening '%s'", cfg_file)); } else - srv_log(xs_fmt("invalid user '%s'", uid)); + srv_debug(1, xs_fmt("invalid user '%s'", uid)); if (!ret) user_free(snac);