From ed4a5301aeacc0df6e2a768edc68057342e2ded6 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Fri, 13 Dec 2013 18:14:48 +0100 Subject: Print data on invalid packet length --- src/pjctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pjctl.c b/src/pjctl.c index 5eb7520..1722800 100644 --- a/src/pjctl.c +++ b/src/pjctl.c @@ -244,7 +244,8 @@ handle_data(struct pjctl *pjctl, char *data, int len) struct queue_command *cmd; if (len < 8 || len > PJLINK_TERMINATOR) { - fprintf(stderr, "error: invalid packet length: %d\n", len); + fprintf(stderr, "error: invalid packet length: %d: data: %*s\n", + len, len, data); return -1; } -- cgit