summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-12-13 18:14:48 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-12-13 18:14:48 +0100
commited4a5301aeacc0df6e2a768edc68057342e2ded6 (patch)
tree0e17c9da8dd5d7d4eda551397144ac7ffd80d242
parentdcbb1f9f99b6720638ed1d5be46fbf0b712791b6 (diff)
downloadpjctl-ed4a5301aeacc0df6e2a768edc68057342e2ded6.tar.gz
pjctl-ed4a5301aeacc0df6e2a768edc68057342e2ded6.tar.bz2
pjctl-ed4a5301aeacc0df6e2a768edc68057342e2ded6.zip
Print data on invalid packet length
-rw-r--r--src/pjctl.c3
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;
}