From 24a05ebd3c0754601a2aa8cd7977375ffb506c09 Mon Sep 17 00:00:00 2001 From: Stéphane Raimbault Date: Thu, 9 Jan 2014 10:40:18 +0100 Subject: [PATCH] win32: init of modbus_tcp_pi_listen (#187) --- src/modbus-tcp.c | 6 ++++++ 1 file changed, 6 insertions(+), 0 deletions(-) diff --git a/src/modbus-tcp.c b/src/modbus-tcp.c index c304441..c228c16 100644 --- a/src/modbus-tcp.c +++ b/src/modbus-tcp.c @@ -547,6 +547,12 @@ int modbus_tcp_pi_listen(modbus_t *ctx, int nb_connection) ctx_tcp_pi = ctx->backend_data; +#ifdef OS_WIN32 + if (modbustcp_init_win32() == -1) { + return -1; + } +#endif + if (ctx_tcp_pi->node[0] == 0) node = NULL; /* == any */ else -- libgit2 0.21.4