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

Function ldbMaxlen

app/redis-6.2.6/src/scripting.c:2642–2654  ·  view source on GitHub ↗

Implements the debugger "maxlen" command. It just queries or sets the * ldb.maxlen variable. */

Source from the content-addressed store, hash-verified

2640/* Implements the debugger "maxlen" command. It just queries or sets the
2641 * ldb.maxlen variable. */
2642void ldbMaxlen(sds *argv, int argc) {
2643 if (argc == 2) {
2644 int newval = atoi(argv[1]);
2645 ldb.maxlen_hint_sent = 1; /* User knows about this command. */
2646 if (newval != 0 && newval <= 60) newval = 60;
2647 ldb.maxlen = newval;
2648 }
2649 if (ldb.maxlen) {
2650 ldbLog(sdscatprintf(sdsempty(),"<value> replies are truncated at %d bytes.",(int)ldb.maxlen));
2651 } else {
2652 ldbLog(sdscatprintf(sdsempty(),"<value> replies are unlimited."));
2653 }
2654}
2655
2656/* Read debugging commands from client.
2657 * Return C_OK if the debugging session is continuing, otherwise

Callers 1

ldbReplFunction · 0.85

Calls 3

ldbLogFunction · 0.85
sdscatprintfFunction · 0.85
sdsemptyFunction · 0.85

Tested by

no test coverage detected