X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fmodbus.c;h=11b9bf1be8a8d265ebdd4338ffe96fec5e0c7d19;hb=ba76b1429d2b11935602aaf85174fa6058325d0f;hp=2605ec239182bf17315aa1563f38284d680fb13e;hpb=665099d3913062f7deec6ff9956a2febc5843a63;p=collectd.git diff --git a/src/modbus.c b/src/modbus.c index 2605ec23..11b9bf1b 100644 --- a/src/modbus.c +++ b/src/modbus.c @@ -80,7 +80,7 @@ enum mb_register_type_e /* {{{ */ REG_TYPE_UINT32, REG_TYPE_FLOAT }; /* }}} */ -enum mb_mreg_type_e /* {{{ */ +enum mb_mreg_type_e /* {{{ */ { MREG_HOLDING, MREG_INPUT @@ -257,7 +257,7 @@ static int mb_submit (mb_host_t *host, mb_slave_t *slave, /* {{{ */ if ((host == NULL) || (slave == NULL) || (data == NULL)) return (EINVAL); - if (host->interval <= 0) + if (host->interval == 0) host->interval = plugin_get_interval (); if (slave->instance[0] == 0) @@ -503,7 +503,7 @@ static int mb_read_data (mb_host_t *host, mb_slave_t *slave, /* {{{ */ modbus_free (host->connection); #endif } - + #if LEGACY_LIBMODBUS /* Version 2.0.3: Pass the connection struct as a pointer and pass the slave * id to each call of "read_holding_registers". */