Sentinel: announce ip/port changes + rewrite.

The original implementation was modified in order to allow to
selectively announce a different IP or port, and to rewrite the two
options in the config file after a rewrite.
This commit is contained in:
antirez
2014-09-04 11:23:19 +02:00
parent 3d939266be
commit cd576a1aab
2 changed files with 35 additions and 19 deletions

View File

@ -1415,7 +1415,7 @@ void rewriteConfigStringOption(struct rewriteConfigState *state, char *option, c
return;
}
/* Compare the strings as sds strings to have a binary safe comparison. */
/* Set force to zero if the value is set to its default. */
if (defvalue && strcmp(value,defvalue) == 0) force = 0;
line = sdsnew(option);