From d8b209ba33b60e1b1f844f1ff31de21f5e14e098 Mon Sep 17 00:00:00 2001 From: Heiko Reese Date: Fri, 20 Aug 2021 01:04:19 +0200 Subject: [PATCH] Removed debugging statements. --- src/debug_helpers.c | 26 ++++++++++++++++++++++++++ src/debug_helpers.h | 8 ++++++++ src/libexim-encrypt-dlfunc.c | 25 ------------------------- 3 files changed, 34 insertions(+), 25 deletions(-) create mode 100644 src/debug_helpers.c create mode 100644 src/debug_helpers.h diff --git a/src/debug_helpers.c b/src/debug_helpers.c new file mode 100644 index 0000000..a461043 --- /dev/null +++ b/src/debug_helpers.c @@ -0,0 +1,26 @@ +/* + * Convert a string to its hexadecimal representation. + * + * Use like this: + * log_write(0, LOG_MAIN, "DEBUG: %s", string2hex(var, var_len)); +*/ +char * string2hex(unsigned char * input, size_t length) { + const int growth = 3; + char * outstring = store_get(growth*length+1); + memset(outstring, 0, 3*length+1); + for (int i =0; i -char * string2hex(unsigned char * input, size_t length) { - const int growth = 3; - char * outstring = store_get(growth*length+1); - memset(outstring, 0, 3*length+1); - for (int i =0; i