Suppress "Unknown command" messages in the dumplog.
Backported from TNNT. Only affects dumplog pline history, not any other form of pline history. The impetus for this is to avoid dumplogs full of "Unknown command foo." messages which don't provide any value for people reading the file. In many cases, these messages crowd out the actual message history, making it hard to reconstruct what happened.
This commit is contained in:
committed by
Patric Mueller
parent
f044576309
commit
a8a321423d
@@ -29,6 +29,8 @@ const char *line;
|
||||
unsigned indx = g.saved_pline_index; /* next slot to use */
|
||||
char *oldest = g.saved_plines[indx]; /* current content of that slot */
|
||||
|
||||
if (!strncmp(line, "Unknown command", 15))
|
||||
return;
|
||||
if (oldest && strlen(oldest) >= strlen(line)) {
|
||||
/* this buffer will gradually shrink until the 'else' is needed;
|
||||
there's no pressing need to track allocation size instead */
|
||||
|
||||
Reference in New Issue
Block a user