Bläddra i källkod

win32: init of modbus_tcp_pi_listen (#187)

Stéphane Raimbault 11 år sedan
förälder
incheckning
24a05ebd3c
1 ändrade filer med 6 tillägg och 0 borttagningar
  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