Having this enabled makes collectd's stdout and stderr very noisy. From
now on, only activate this flag when collectd is built with
--enable-debug.
Thanks to Eric Sandeen for mentioning this problem on IRC.
if (host == NULL)
return (EINVAL);
if (host == NULL)
return (EINVAL);
modbus_set_debug (&host->connection, 1);
modbus_set_debug (&host->connection, 1);
/* We'll do the error handling ourselves. */
modbus_set_error_handling (&host->connection, NOP_ON_ERROR);
/* We'll do the error handling ourselves. */
modbus_set_error_handling (&host->connection, NOP_ON_ERROR);
modbus_set_debug (host->connection, 1);
modbus_set_debug (host->connection, 1);
/* We'll do the error handling ourselves. */
modbus_set_error_recovery (host->connection, 0);
/* We'll do the error handling ourselves. */
modbus_set_error_recovery (host->connection, 0);