diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2026-02-10 12:30:25 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska-skaware@skarnet.org> | 2026-02-10 12:30:25 +0000 |
| commit | fa7b9810d09152a1e6adf16d9d8bad7a037e307f (patch) | |
| tree | 2ac287a2e704fe888550ea7d27fa748bb2a1e2e2 | |
| parent | 790058e1a89b979dc475be12952132dcc30e6ade (diff) | |
| download | smtpd-starttls-proxy-fa7b9810d09152a1e6adf16d9d8bad7a037e307f.tar.gz | |
Debug instructions for the smtproutes converter
| -rw-r--r-- | src/qmail-remote/smtproutes.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/qmail-remote/smtproutes.c b/src/qmail-remote/smtproutes.c index 7fcfada..1aac915 100644 --- a/src/qmail-remote/smtproutes.c +++ b/src/qmail-remote/smtproutes.c @@ -18,6 +18,7 @@ #include <skalibs/stralloc.h> #include <skalibs/djbtime.h> #include <skalibs/djbunix.h> +#include <skalibs/lolstdio.h> #include <smtpd-starttls-proxy/config.h> #include "qmailr.h" @@ -127,6 +128,12 @@ static inline void smtproutes_compile (int fdr, int fdw) { char c = getnext(&b) ; uint16_t val = table[state][cclass(c)] ; + LOLDEBUG("state %hhu, char %c, newstate %hu, actions %s%s%s%s%s", state, c, val & 0x000f, + val & 0x0100 ? "n" : "", + val & 0x0200 ? "h" : "", + val & 0x0400 ? "r" : "", + val & 0x0800 ? "p" : "", + val & 0x1000 ? "a" : "") ; state = val & 0x000f ; if (val & 0x0100) { @@ -151,9 +158,12 @@ static inline void smtproutes_compile (int fdr, int fdw) } if (val & 0x0100) { - if (relaypos > 1 || relayend > 2 + relaypos) + if (relaypos || relayend > 2 + relaypos) + { + LOLDEBUG("adding entry: %.*s -> %.*s", (int)relaypos, sa.s, (int)(relayend - relaypos), sa.s + relaypos) ; if (!cdbmake_add(&cm, sa.s, relaypos, sa.s + relaypos, relayend - relaypos)) qmailr_tempusys("cdbmake_add") ; + } sa.len = 0 ; } } |
