MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rewriteConfigClientoutputbufferlimitOption

Function rewriteConfigClientoutputbufferlimitOption

app/redis-6.2.6/src/config.c:1475–1501  ·  view source on GitHub ↗

Rewrite the client-output-buffer-limit option. */

Source from the content-addressed store, hash-verified

1473
1474/* Rewrite the client-output-buffer-limit option. */
1475void 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. */
1504void rewriteConfigOOMScoreAdjValuesOption(struct rewriteConfigState *state) {

Callers 1

rewriteConfigFunction · 0.85

Calls 6

getClientTypeNameFunction · 0.85
strcmpFunction · 0.85
sdscatprintfFunction · 0.85
sdsemptyFunction · 0.85
rewriteConfigRewriteLineFunction · 0.85

Tested by

no test coverage detected