Rewrite the slaveof option. */
| 1443 | |
| 1444 | /* Rewrite the slaveof option. */ |
| 1445 | void rewriteConfigSlaveofOption(struct rewriteConfigState *state, char *option) { |
| 1446 | sds line; |
| 1447 | |
| 1448 | /* If this is a master, we want all the slaveof config options |
| 1449 | * in the file to be removed. Note that if this is a cluster instance |
| 1450 | * we don't want a slaveof directive inside redis.conf. */ |
| 1451 | if (server.cluster_enabled || server.masterhost == NULL) { |
| 1452 | rewriteConfigMarkAsProcessed(state,option); |
| 1453 | return; |
| 1454 | } |
| 1455 | line = sdscatprintf(sdsempty(),"%s %s %d", option, |
| 1456 | server.masterhost, server.masterport); |
| 1457 | rewriteConfigRewriteLine(state,option,line,1); |
| 1458 | } |
| 1459 | |
| 1460 | /* Rewrite the notify-keyspace-events option. */ |
| 1461 | void rewriteConfigNotifykeyspaceeventsOption(struct rewriteConfigState *state) { |
no test coverage detected