File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6262#include "modbus-tcp.h"
6363
6464#ifdef OS_WIN32
65- static int _modbus_tcp_init_win32 (void )
65+ static int _modbus_tcp_init_win32 (modbus_t * ctx )
6666{
6767 /* Initialise Windows Socket API */
6868 WSADATA wsaData ;
@@ -320,7 +320,7 @@ static int _modbus_tcp_connect(modbus_t *ctx)
320320 int flags = SOCK_STREAM ;
321321
322322#ifdef OS_WIN32
323- if (_modbus_tcp_init_win32 () == -1 ) {
323+ if (_modbus_tcp_init_win32 (ctx ) == -1 ) {
324324 return -1 ;
325325 }
326326#endif
@@ -382,7 +382,7 @@ static int _modbus_tcp_pi_connect(modbus_t *ctx)
382382 modbus_tcp_pi_t * ctx_tcp_pi = ctx -> backend_data ;
383383
384384#ifdef OS_WIN32
385- if (_modbus_tcp_init_win32 () == -1 ) {
385+ if (_modbus_tcp_init_win32 (ctx ) == -1 ) {
386386 return -1 ;
387387 }
388388#endif
@@ -519,7 +519,7 @@ int modbus_tcp_listen(modbus_t *ctx, int nb_connection)
519519 ctx_tcp = ctx -> backend_data ;
520520
521521#ifdef OS_WIN32
522- if (_modbus_tcp_init_win32 () == -1 ) {
522+ if (_modbus_tcp_init_win32 (ctx ) == -1 ) {
523523 return -1 ;
524524 }
525525#endif
@@ -593,7 +593,7 @@ int modbus_tcp_pi_listen(modbus_t *ctx, int nb_connection)
593593 ctx_tcp_pi = ctx -> backend_data ;
594594
595595#ifdef OS_WIN32
596- if (_modbus_tcp_init_win32 () == -1 ) {
596+ if (_modbus_tcp_init_win32 (ctx ) == -1 ) {
597597 return -1 ;
598598 }
599599#endif
You can’t perform that action at this time.
0 commit comments