From 6c1d2c84a380c4ddfee1032efb287e9ef7a5af75 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Sun, 10 Mar 2013 13:34:11 +0100 Subject: econproxy: read_packet: Increase debugging on error --- econproxy.c | 6 ++++-- 1 file 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; } } -- cgit