MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / ldbMaxlen

Function ldbMaxlen

src/scripting.cpp:2667–2679  ·  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

2665/* Implements the debugger "maxlen" command. It just queries or sets the
2666 * ldb.maxlen variable. */
2667void ldbMaxlen(sds *argv, int argc) {
2668 if (argc == 2) {
2669 int newval = atoi(argv[1]);
2670 ldb.maxlen_hint_sent = 1; /* User knows about this command. */
2671 if (newval != 0 && newval <= 60) newval = 60;
2672 ldb.maxlen = newval;
2673 }
2674 if (ldb.maxlen) {
2675 ldbLog(sdscatprintf(sdsempty(),"<value> replies are truncated at %d bytes.",(int)ldb.maxlen));
2676 } else {
2677 ldbLog(sdscatprintf(sdsempty(),"<value> replies are unlimited."));
2678 }
2679}
2680
2681/* Read debugging commands from client.
2682 * 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