Rewrite the client-output-buffer-limit option. */
| 1732 | |
| 1733 | /* Rewrite the client-output-buffer-limit option. */ |
| 1734 | void rewriteConfigClientoutputbufferlimitOption(struct rewriteConfigState *state) { |
| 1735 | int j; |
| 1736 | const char *option = "client-output-buffer-limit"; |
| 1737 | |
| 1738 | for (j = 0; j < CLIENT_TYPE_OBUF_COUNT; j++) { |
| 1739 | int force = (cserver.client_obuf_limits[j].hard_limit_bytes != |
| 1740 | clientBufferLimitsDefaults[j].hard_limit_bytes) || |
| 1741 | (cserver.client_obuf_limits[j].soft_limit_bytes != |
| 1742 | clientBufferLimitsDefaults[j].soft_limit_bytes) || |
| 1743 | (cserver.client_obuf_limits[j].soft_limit_seconds != |
| 1744 | clientBufferLimitsDefaults[j].soft_limit_seconds); |
| 1745 | sds line; |
| 1746 | char hard[64], soft[64]; |
| 1747 | |
| 1748 | rewriteConfigFormatMemory(hard,sizeof(hard), |
| 1749 | cserver.client_obuf_limits[j].hard_limit_bytes); |
| 1750 | rewriteConfigFormatMemory(soft,sizeof(soft), |
| 1751 | cserver.client_obuf_limits[j].soft_limit_bytes); |
| 1752 | |
| 1753 | const char *tname = getClientTypeName(j); |
| 1754 | if (!strcmp(tname,"slave")) tname = "replica"; |
| 1755 | line = sdscatprintf(sdsempty(),"%s %s %s %s %ld", |
| 1756 | option, tname, hard, soft, |
| 1757 | (long) cserver.client_obuf_limits[j].soft_limit_seconds); |
| 1758 | rewriteConfigRewriteLine(state,option,line,force); |
| 1759 | } |
| 1760 | } |
| 1761 | |
| 1762 | /* Rewrite the oom-score-adj-values option. */ |
| 1763 | void rewriteConfigOOMScoreAdjValuesOption(struct rewriteConfigState *state) { |
no test coverage detected