chiark
/
gitweb
/
~mdw
/
secnet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
site: Log about crossed MSG1 ignored only once
[secnet]
/
site.c
diff --git
a/site.c
b/site.c
index 681e595a4c1e64ab97a50d21a250f57841b31500..11fc28be2443973ab84c30490a7d79dd09efabf0 100644
(file)
--- a/
site.c
+++ b/
site.c
@@
-336,6
+336,7
@@
struct site {
uint32_t state;
uint64_t now; /* Most recently seen time */
bool_t allow_send_prod;
uint32_t state;
uint64_t now; /* Most recently seen time */
bool_t allow_send_prod;
+ bool_t msg1_crossed_logged;
int resolving_count;
int resolving_n_results_all;
int resolving_n_results_stored;
int resolving_count;
int resolving_n_results_all;
int resolving_n_results_stored;
@@
-1525,6
+1526,7
@@
static bool_t enter_new_state(struct site *st, uint32_t next)
case SITE_SENTMSG1:
state_assert(st,st->state==SITE_RUN || st->state==SITE_RESOLVE);
gen=generate_msg1;
case SITE_SENTMSG1:
state_assert(st,st->state==SITE_RUN || st->state==SITE_RESOLVE);
gen=generate_msg1;
+ st->msg1_crossed_logged = False;
break;
case SITE_SENTMSG2:
state_assert(st,st->state==SITE_RUN || st->state==SITE_RESOLVE ||
break;
case SITE_SENTMSG2:
state_assert(st,st->state==SITE_RUN || st->state==SITE_RESOLVE ||
@@
-1797,8
+1799,9
@@
static bool_t site_incoming(void *sst, struct buffer_if *buf,
incoming one, otherwise we process it as usual. */
if (st->setup_priority) {
BUF_FREE(buf);
incoming one, otherwise we process it as usual. */
if (st->setup_priority) {
BUF_FREE(buf);
- slog(st,LOG_DUMP,"crossed msg1s; we are higher "
- "priority => ignore incoming msg1");
+ if (!st->msg1_crossed_logged++)
+ slog(st,LOG_DUMP,"crossed msg1s; we are higher "
+ "priority => ignore incoming msg1");
return True;
} else {
slog(st,LOG_DUMP,"crossed msg1s; we are lower "
return True;
} else {
slog(st,LOG_DUMP,"crossed msg1s; we are lower "