Implements the debugger "maxlen" command. It just queries or sets the * ldb.maxlen variable. */
| 2665 | /* Implements the debugger "maxlen" command. It just queries or sets the |
| 2666 | * ldb.maxlen variable. */ |
| 2667 | void 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 |
no test coverage detected