Commit 24a05ebd3c0754601a2aa8cd7977375ffb506c09

Authored by Stéphane Raimbault
1 parent bb6be03c

win32: init of modbus_tcp_pi_listen (#187)

Showing 1 changed file with 6 additions and 0 deletions
src/modbus-tcp.c
@@ -547,6 +547,12 @@ int modbus_tcp_pi_listen(modbus_t *ctx, int nb_connection) @@ -547,6 +547,12 @@ int modbus_tcp_pi_listen(modbus_t *ctx, int nb_connection)
547 547
548 ctx_tcp_pi = ctx->backend_data; 548 ctx_tcp_pi = ctx->backend_data;
549 549
  550 +#ifdef OS_WIN32
  551 + if (modbustcp_init_win32() == -1) {
  552 + return -1;
  553 + }
  554 +#endif
  555 +
550 if (ctx_tcp_pi->node[0] == 0) 556 if (ctx_tcp_pi->node[0] == 0)
551 node = NULL; /* == any */ 557 node = NULL; /* == any */
552 else 558 else