diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-12-13 18:14:48 +0100 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-12-13 18:14:48 +0100 |
commit | ed4a5301aeacc0df6e2a768edc68057342e2ded6 (patch) | |
tree | 0e17c9da8dd5d7d4eda551397144ac7ffd80d242 | |
parent | dcbb1f9f99b6720638ed1d5be46fbf0b712791b6 (diff) | |
download | pjctl-ed4a5301aeacc0df6e2a768edc68057342e2ded6.tar.gz pjctl-ed4a5301aeacc0df6e2a768edc68057342e2ded6.tar.bz2 pjctl-ed4a5301aeacc0df6e2a768edc68057342e2ded6.zip |
Print data on invalid packet length
-rw-r--r-- | src/pjctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |