X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fmodbus.c;h=d538fb3f717774bbc36b6c2eb7b7e1ff0919bc85;hb=2a21d97cffadd2d329a48693267eb0bda59bd35e;hp=d2b0a535ff9a0dd135f05fe2b217145ccc9c0315;hpb=ca4a6c8a856a9012270ec10389b08d54e70e3401;p=collectd.git diff --git a/src/modbus.c b/src/modbus.c index d2b0a535..d538fb3f 100644 --- a/src/modbus.c +++ b/src/modbus.c @@ -310,7 +310,9 @@ static int mb_init_connection (mb_host_t *host) /* {{{ */ 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); @@ -390,7 +392,9 @@ static int mb_init_connection (mb_host_t *host) /* {{{ */ } } +#if COLLECT_DEBUG modbus_set_debug (host->connection, 1); +#endif /* We'll do the error handling ourselves. */ modbus_set_error_recovery (host->connection, 0);