Currently this debug converter is only enabled when DEBUG_EXPR is
defined at build time (which is different than other debug build
options and unclear from the documentation).
This moves the patch to the default build, so everyone can use it.
Can be backported to stable releases (but not required).
---
There should not be a performance impact for this change to be
acceptable.
---
doc/configuration.txt | 3 +--
src/sample.c | 5 -----
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/doc/configuration.txt b/doc/configuration.txt
index cd6edc7..556b548 100644
--- a/doc/configuration.txt
+++ b/doc/configuration.txt
@@ -13280,8 +13280,7 @@ da-csv-conv(<prop>[,<prop>*])
debug
This converter is used as debug tool. It dumps on screen the content and the
- type of the input sample. The sample is returned as is on its output. This
- converter only exists when haproxy was built with debugging enabled.
+ type of the input sample. The sample is returned as is on its output.
div(<value>)
Divides the input value of type signed integer by <value>, and returns the
diff --git a/src/sample.c b/src/sample.c
index 1e4039d..e302d97 100644
--- a/src/sample.c
+++ b/src/sample.c
@@ -1440,7 +1440,6 @@ void release_sample_expr(struct sample_expr *expr)
/* These functions set the data type on return. */
/*****************************************************************/
-#ifdef DEBUG_EXPR
static int sample_conv_debug(const struct arg *arg_p, struct sample *smp, void
*private)
{
int i;
@@ -1477,7 +1476,6 @@ static int sample_conv_debug(const struct arg *arg_p,
struct sample *smp, void *
}
return 1;
}
-#endif
static int sample_conv_base642bin(const struct arg *arg_p, struct sample *smp,
void *private)
{
@@ -3337,10 +3335,7 @@ INITCALL1(STG_REGISTER, sample_register_fetches,
&smp_kws);
/* Note: must not be declared <const> as its list will be overwritten */
static struct sample_conv_kw_list sample_conv_kws = {ILH, {
-#ifdef DEBUG_EXPR
{ "debug", sample_conv_debug, 0, NULL, SMP_T_ANY,
SMP_T_ANY },
-#endif
-
{ "b64dec", sample_conv_base642bin,0, NULL, SMP_T_STR,
SMP_T_BIN },
{ "base64", sample_conv_bin2base64,0, NULL, SMP_T_BIN,
SMP_T_STR },
{ "upper", sample_conv_str2upper, 0, NULL, SMP_T_STR,
SMP_T_STR },
--
2.7.4