summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5e712a9)
raw | patch | inline | side by side (parent: 5e712a9)
author | Florian Forster <octo@noris.net> | |
Wed, 24 Mar 2010 14:43:42 +0000 (15:43 +0100) | ||
committer | Florian Forster <octo@noris.net> | |
Wed, 24 Mar 2010 14:43:42 +0000 (15:43 +0100) |
src/modbus.c | patch | blob | history |
diff --git a/src/modbus.c b/src/modbus.c
index 656d9c835afa138764008e2c94575884c4d62743..78c43350def7c4af7bca68bfe4c14b8cfdac9cd5 100644 (file)
--- a/src/modbus.c
+++ b/src/modbus.c
if ((host == NULL) || (slave == NULL) || (data == NULL))
return (EINVAL);
+ if (host->interval <= 0)
+ host->interval = interval_g;
+
if (slave->instance[0] == 0)
ssnprintf (slave->instance, sizeof (slave->instance), "slave_%i",
slave->id);
vl.values = &value;
vl.values_len = 1;
+ vl.interval = host->interval;
sstrncpy (vl.host, host->host, sizeof (vl.host));
sstrncpy (vl.plugin, "modbus", sizeof (vl.plugin));
sstrncpy (vl.plugin_instance, slave->instance, sizeof (vl.plugin_instance));