summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-12-13 18:14:48 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2014-01-04 16:10:13 +0100
commitec612d8c55d1eded6eb6617b79d3f322bd9ee9e7 (patch)
treef09aaf9faf7d0f1e71ae346c4d592f267da91f36
parent178ea1ddfbdfb167155f59f70487322204257990 (diff)
downloadpjctl-ec612d8c55d1eded6eb6617b79d3f322bd9ee9e7.tar.gz
pjctl-ec612d8c55d1eded6eb6617b79d3f322bd9ee9e7.tar.bz2
pjctl-ec612d8c55d1eded6eb6617b79d3f322bd9ee9e7.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 d2c1ad2..6b555a0 100644
--- a/src/pjctl.c
+++ b/src/pjctl.c
@@ -245,7 +245,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;
}