From f6e01b4434ec065b65704dacd7b911c5037a8a19 Mon Sep 17 00:00:00 2001 From: Marko Date: Tue, 12 Jun 2018 22:34:58 +0300 Subject: [PATCH] MXS-591 Fix documentation and change comment parameter type --- Documentation/Filters/Comment.md | 8 +++----- server/modules/filter/comment/commentfilter.cc | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Documentation/Filters/Comment.md b/Documentation/Filters/Comment.md index 0c06670df..b59b89ac4 100644 --- a/Documentation/Filters/Comment.md +++ b/Documentation/Filters/Comment.md @@ -11,7 +11,7 @@ comments when they are received by the server. [MyComment] type=filter module=comment -inject=Comment to be injected +inject="Comment to be injected" [MyService] type=service @@ -40,15 +40,13 @@ Variables must be written in all caps. ### Example 1 - Inject IP address of the connected client into statements as comment. -You want to see the IP addresses of the clients with the server so you -define filter to comment the into the statements they send. - +The following configuration adds the IP address of the client to the comment. ``` [IPComment] type=filter module=comment -inject=IP=$IP +inject="IP=$IP" [MyService] type=service diff --git a/server/modules/filter/comment/commentfilter.cc b/server/modules/filter/comment/commentfilter.cc index e9a07cf26..32db75850 100644 --- a/server/modules/filter/comment/commentfilter.cc +++ b/server/modules/filter/comment/commentfilter.cc @@ -42,7 +42,7 @@ extern "C" MXS_MODULE* MXS_CREATE_MODULE() NULL, /* Thread init. */ NULL, /* Thread finish. */ { - { CN_INJECT, MXS_MODULE_PARAM_STRING, NULL, MXS_MODULE_OPT_REQUIRED }, + { CN_INJECT, MXS_MODULE_PARAM_QUOTEDSTRING, NULL, MXS_MODULE_OPT_REQUIRED }, { MXS_END_MODULE_PARAMS } } };