3 @@ -281,10 +281,8 @@ static int mb_init_connection (mb_host_t
5 modbus_set_debug (&host->connection, 1);
8 /* We'll do the error handling ourselves. */
9 modbus_set_error_handling (&host->connection, NOP_ON_ERROR);
12 if ((host->port < 1) || (host->port > 65535))
13 host->port = MODBUS_TCP_DEFAULT_PORT;
14 @@ -293,10 +291,8 @@ static int mb_init_connection (mb_host_t
15 host->node, host->port);
17 modbus_init_tcp (&host->connection,
18 - /* host = */ host->node);
20 + /* host = */ host->node,
21 /* port = */ host->port);
24 status = modbus_connect (&host->connection);
26 @@ -325,7 +321,7 @@ static int mb_init_connection (mb_host_t
27 static int mb_read_data (mb_host_t *host, mb_slave_t *slave, /* {{{ */