Display debug data on mailbox error.
authorFlorian Pose <fp@igh-essen.com>
Fri, 20 Oct 2006 12:41:22 +0000
changeset 424 b792665b2dba
parent 423 862ff892cf18
child 425 d36808888817
Display debug data on mailbox error.
master/mailbox.c
--- a/master/mailbox.c	Fri Oct 20 12:33:48 2006 +0000
+++ b/master/mailbox.c	Fri Oct 20 12:41:22 2006 +0000
@@ -179,6 +179,10 @@
 	uint16_t code = EC_READ_U16(datagram->data + 8);
 
         EC_ERR("Mailbox error response received.\n");
+
+        if (slave->master->debug_level)
+            ec_print_data(datagram->data + 6, data_size);
+
 	for (mbox_msg = mbox_error_messages; mbox_msg->code; mbox_msg++) {
             if (mbox_msg->code != code) continue;
             EC_ERR("Error reply code: 0x%04X: \"%s\".\n",