X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsrc%2Fdebug.c;h=eb62157def1dfc6a90d4830225bf2279cf0d288d;hb=42c7f0b4ea09d8971a19beeef743ec8981d4aacc;hp=2ddf22907a083e6a9c31b091898e3d11c098b738;hpb=d7978c0f8af20ff4c3f770589b1bb81568aecff3;p=exim.git diff --git a/src/src/debug.c b/src/src/debug.c index 2ddf22907..eb62157de 100644 --- a/src/src/debug.c +++ b/src/src/debug.c @@ -14,6 +14,26 @@ static int debug_prefix_length = 0; +const uschar * rc_names[] = { /* Mostly for debug output */ + [OK] = US"OK", + [DEFER] = US"DEFER", + [FAIL] = US"FAIL", + [ERROR] = US"ERROR", + [FAIL_FORCED] = US"FAIL_FORCED", + [DECLINE] = US"DECLINE", + [PASS] = US"PASS", + [DISCARD] = US"DISCARD", + [SKIP] = US"SKIP", + [REROUTED] = US"REROUTED", + [PANIC] = US"PANIC", + [BAD64] = US"BAD64", + [UNEXPECTED] = US"UNEXPECTED", + [CANCELLED] = US"CANCELLED", + [FAIL_SEND] = US"FAIL_SEND", + [FAIL_DROP] = US"FAIL_DROP" +}; + + /************************************************* * Print tree * *************************************************/ @@ -127,6 +147,17 @@ debug_printf("%s uid=%ld gid=%ld euid=%ld egid=%ld\n", s, (long int)getegid()); } +/************************************************/ + +/* Give a string for a return-code */ + +const uschar * +rc_to_string(int rc) +{ +return rc < 0 || rc >= nelem(rc_names) ? US"?" : rc_names[rc]; +} + +