b1c8861f222bba1591a9f58c94d4a322152cf6b5
[openwrt/svn-archive/archive.git] / utils / collectd / patches / 300-fix-modbus.patch
1 --- a/src/modbus.c 2011-03-28 14:51:41.000000000 +0200
2 +++ b/src/modbus.c 2011-03-28 14:52:12.000000000 +0200
3 @@ -293,10 +293,8 @@
4 host->node, host->port);
5
6 modbus_init_tcp (&host->connection,
7 - /* host = */ host->node);
8 -#if 0
9 + /* host = */ host->node,
10 /* port = */ host->port);
11 -#endif
12
13 status = modbus_connect (&host->connection);
14 if (status != 0)
15 @@ -366,7 +367,7 @@
16 {
17 status = read_holding_registers (&host->connection,
18 /* slave = */ slave->id, /* start_addr = */ data->register_base,
19 - /* num_registers = */ values_num, /* buffer = */ values);
20 + /* num_registers = */ values_num, /* buffer = */ (uint16_t*)values);
21 if (status > 0)
22 break;
23