Commit 24a05ebd3c0754601a2aa8cd7977375ffb506c09
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 | 547 | |
| 548 | 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 | 556 | if (ctx_tcp_pi->node[0] == 0) |
| 551 | 557 | node = NULL; /* == any */ |
| 552 | 558 | else | ... | ... |