From 9839d4017f0f5cc02c5201fc4648bc28cd6a4354 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 21 Sep 2019 16:13:29 +0100 Subject: [PATCH] site: Record whynot in default (end of comm_notify) case send_nak will print the type and the two indices, so we don't. Signed-off-by: Ian Jackson --- secnet.h | 4 ++++ site.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/secnet.h b/secnet.h index 95f3413..95bda99 100644 --- a/secnet.h +++ b/secnet.h @@ -465,6 +465,10 @@ typedef struct comm_clientinfo *comm_clientinfo_fn(void *state, dict_t*, * The semantics depend on the dict and defined by the comm, and * should be documented in README. */ +enum { + comm_notify_whynot_general, +}; + /* Return True if the packet was processed, and shouldn't be passed to any other potential receivers. (buf is freed iff True returned.) */ typedef bool_t comm_notify_fn(void *state, struct buffer_if *buf, diff --git a/site.c b/site.c index add6039..8ca8769 100644 --- a/site.c +++ b/site.c @@ -2084,6 +2084,9 @@ static bool_t site_incoming(void *sst, struct buffer_if *buf, return True; } + if (priomsg_update_p(whynot, comm_notify_whynot_general)) + truncmsg_add_string(&whynot->m, + "not MSG1 or PROD; unknown dest index"); return False; } -- 2.30.2