diff --git a/src/modbus.c b/src/modbus.c
index d2b0a535ff9a0dd135f05fe2b217145ccc9c0315..d538fb3f717774bbc36b6c2eb7b7e1ff0919bc85 100644 (file)
--- a/src/modbus.c
+++ b/src/modbus.c
if (host == NULL)
return (EINVAL);
+#if COLLECT_DEBUG
modbus_set_debug (&host->connection, 1);
+#endif
/* We'll do the error handling ourselves. */
modbus_set_error_handling (&host->connection, NOP_ON_ERROR);
}
}
+#if COLLECT_DEBUG
modbus_set_debug (host->connection, 1);
+#endif
/* We'll do the error handling ourselves. */
modbus_set_error_recovery (host->connection, 0);