Browse Source

win32: init of modbus_tcp_pi_listen (#187)

Stéphane Raimbault 11 years ago
parent
commit
24a05ebd3c
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/modbus-tcp.c

+ 6 - 0
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