summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-03-10 13:34:11 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-03-10 13:34:11 +0100
commit6c1d2c84a380c4ddfee1032efb287e9ef7a5af75 (patch)
tree07735937d8403181bd150e6ea5d1be8fba5f80e3
parent1caee83a37f028e1d6fbb476d17daa10f119a4ee (diff)
downloadecon-6c1d2c84a380c4ddfee1032efb287e9ef7a5af75.tar.gz
econ-6c1d2c84a380c4ddfee1032efb287e9ef7a5af75.tar.bz2
econ-6c1d2c84a380c4ddfee1032efb287e9ef7a5af75.zip
econproxy: read_packet: Increase debugging on error
-rw-r--r--econproxy.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/econproxy.c b/econproxy.c
index 2475e5f..e89b0f9 100644
--- a/econproxy.c
+++ b/econproxy.c
@@ -124,13 +124,15 @@ read_packet(struct ep *ep)
if (ep->ecmd.recordCount > 0) {
if (ep->ecmd.recordCount > 1) {
fprintf(stderr, "read_packet: did not expect a"
- " packet with more that one record: %d, datasize: %d.\n",
+ " packet with more that one record:"
+ " %d, datasize: %d.\n",
ep->ecmd.recordCount, ep->ehdr.datasize);
return -1;
}
if (ep->ehdr.datasize != (sizeof (struct econ_command) +
sizeof (struct econ_record))) {
- fprintf(stderr, "read_packet: datasize incorrect\n");
+ fprintf(stderr, "read_packet: datasize incorrect, cmd: %d\n",
+ ep->ehdr.commandID);
return -1;
}
}