Rewrite the client-output-buffer-limit option. */
| 1473 | |
| 1474 | /* Rewrite the client-output-buffer-limit option. */ |
| 1475 | void rewriteConfigClientoutputbufferlimitOption(struct rewriteConfigState *state) { |
| 1476 | int j; |
| 1477 | char *option = "client-output-buffer-limit"; |
| 1478 | |
| 1479 | for (j = 0; j < CLIENT_TYPE_OBUF_COUNT; j++) { |
| 1480 | int force = (server.client_obuf_limits[j].hard_limit_bytes != |
| 1481 | clientBufferLimitsDefaults[j].hard_limit_bytes) || |
| 1482 | (server.client_obuf_limits[j].soft_limit_bytes != |
| 1483 | clientBufferLimitsDefaults[j].soft_limit_bytes) || |
| 1484 | (server.client_obuf_limits[j].soft_limit_seconds != |
| 1485 | clientBufferLimitsDefaults[j].soft_limit_seconds); |
| 1486 | sds line; |
| 1487 | char hard[64], soft[64]; |
| 1488 | |
| 1489 | rewriteConfigFormatMemory(hard,sizeof(hard), |
| 1490 | server.client_obuf_limits[j].hard_limit_bytes); |
| 1491 | rewriteConfigFormatMemory(soft,sizeof(soft), |
| 1492 | server.client_obuf_limits[j].soft_limit_bytes); |
| 1493 | |
| 1494 | char *typename = getClientTypeName(j); |
| 1495 | if (!strcmp(typename,"slave")) typename = "replica"; |
| 1496 | line = sdscatprintf(sdsempty(),"%s %s %s %s %ld", |
| 1497 | option, typename, hard, soft, |
| 1498 | (long) server.client_obuf_limits[j].soft_limit_seconds); |
| 1499 | rewriteConfigRewriteLine(state,option,line,force); |
| 1500 | } |
| 1501 | } |
| 1502 | |
| 1503 | /* Rewrite the oom-score-adj-values option. */ |
| 1504 | void rewriteConfigOOMScoreAdjValuesOption(struct rewriteConfigState *state) { |
no test coverage detected