summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2013-05-15 11:15:18 +0200
committerantirez <antirez@gmail.com>2013-05-15 11:15:31 +0200
commitc590e18d15bed4dc576c86bc4b10eed2b0997e15 (patch)
tree128fc4014390f66cbd3fabab272e1a7eab7ce65f
parent328843849f070c5cbdf154b7a96da6dcd317bdd6 (diff)
downloadredis-c590e18d15bed4dc576c86bc4b10eed2b0997e15.tar.gz
CONFIG REWRITE: correctly escape the notify-keyspace-events option.
-rw-r--r--src/config.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c
index 0b03e0de1..57905f649 100644
--- a/src/config.c
+++ b/src/config.c
@@ -1381,7 +1381,9 @@ void rewriteConfigNotifykeyspaceeventsOption(struct rewriteConfigState *state) {
sds line, flags;
flags = keyspaceEventsFlagsToString(server.notify_keyspace_events);
- line = sdscatprintf(sdsempty(),"%s %s", option, flags);
+ line = sdsnew(option);
+ line = sdscatlen(line, " ", 1);
+ line = sdscatrepr(line, flags, sdslen(flags));
sdsfree(flags);
rewriteConfigRewriteLine(state,option,line,force);
}