summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 70c3f77)
raw | patch | inline | side by side (parent: 70c3f77)
author | Marc Fournier <marc.fournier@camptocamp.com> | |
Tue, 9 Dec 2014 23:37:52 +0000 (00:37 +0100) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Tue, 9 Dec 2014 23:37:52 +0000 (00:37 +0100) |
src/modbus.c | patch | blob | history |
diff --git a/src/modbus.c b/src/modbus.c
index 701406dbe73ffb6b5733a0b089a93374801dbcff..795465f041d2a1962ea270ff40cd456771089394 100644 (file)
--- a/src/modbus.c
+++ b/src/modbus.c
}
if (status != values_num)
{
- ERROR ("Modbus plugin: modbus_read_registers (%s/%s) failed. status = %i, values_num = %i "
- "Giving up.", host->host, host->node, status, values_num);
+ ERROR ("Modbus plugin: modbus read function (%s/%s) failed. "
+ " status = %i, values_num = %i. Giving up.",
+ host->host, host->node, status, values_num);
#if LEGACY_LIBMODBUS
modbus_close (&host->connection);
#else
}
else if (strcasecmp ("ModbusRegisterType", child->key) == 0)
{
- #if LEGACY_LIBMODBUS
- ERROR("Modbus plugin: ModbusRegisterType parameter can not be used with your libmodbus version");
- #else
- char tmp[16];
- status = cf_util_get_string_buffer (child, tmp, sizeof (tmp));
- if (status != 0)
- /* do nothing */;
- else if (strcasecmp ("holding", tmp) == 0)
- data.modbus_register_type = MREG_HOLDING;
- else if (strcasecmp ("input", tmp) == 0)
- data.modbus_register_type = MREG_INPUT;
- else
- {
- ERROR ("Modbus plugin: The modbus_register_type \"%s\" is unknown.", tmp);
- status = -1;
- }
- #endif
+#if LEGACY_LIBMODBUS
+ ERROR("Modbus plugin: ModbusRegisterType parameter can not be used "
+ "with your libmodbus version");
+#else
+ char tmp[16];
+ status = cf_util_get_string_buffer (child, tmp, sizeof (tmp));
+ if (status != 0)
+ /* do nothing */;
+ else if (strcasecmp ("holding", tmp) == 0)
+ data.modbus_register_type = MREG_HOLDING;
+ else if (strcasecmp ("input", tmp) == 0)
+ data.modbus_register_type = MREG_INPUT;
+ else
+ {
+ ERROR ("Modbus plugin: The modbus_register_type \"%s\" is unknown.",
+ tmp);
+ status = -1;
+ }
+#endif
}
else
{