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