1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-07-29 13:01:14 +03:00

example, tests: call WSACleanup() for each WSAStartup()

On Windows.

Closes #1283
This commit is contained in:
Viktor Szakats
2023-12-13 00:14:45 +00:00
parent 52c382f7aa
commit 94b6bad3c8
25 changed files with 100 additions and 0 deletions

View File

@ -336,5 +336,9 @@ shutdown:
libssh2_exit(); libssh2_exit();
#ifdef _WIN32
WSACleanup();
#endif
return 0; return 0;
} }

View File

@ -189,5 +189,9 @@ shutdown:
libssh2_exit(); libssh2_exit();
#ifdef _WIN32
WSACleanup();
#endif
return 0; return 0;
} }

View File

@ -292,5 +292,9 @@ shutdown:
libssh2_exit(); libssh2_exit();
#ifdef _WIN32
WSACleanup();
#endif
return 0; return 0;
} }

View File

@ -221,5 +221,9 @@ shutdown:
libssh2_exit(); libssh2_exit();
#ifdef _WIN32
WSACleanup();
#endif
return 0; return 0;
} }

View File

@ -279,5 +279,9 @@ shutdown:
libssh2_exit(); libssh2_exit();
#ifdef _WIN32
WSACleanup();
#endif
return 0; return 0;
} }

View File

@ -301,5 +301,9 @@ shutdown:
libssh2_exit(); libssh2_exit();
#ifdef _WIN32
WSACleanup();
#endif
return 0; return 0;
} }

View File

@ -353,5 +353,9 @@ shutdown:
libssh2_exit(); libssh2_exit();
#ifdef _WIN32
WSACleanup();
#endif
return 0; return 0;
} }

View File

@ -241,5 +241,9 @@ shutdown:
libssh2_exit(); libssh2_exit();
#ifdef _WIN32
WSACleanup();
#endif
return 0; return 0;
} }

View File

@ -179,5 +179,9 @@ shutdown:
libssh2_exit(); libssh2_exit();
#ifdef _WIN32
WSACleanup();
#endif
return 0; return 0;
} }

View File

@ -178,5 +178,9 @@ shutdown:
libssh2_exit(); libssh2_exit();
#ifdef _WIN32
WSACleanup();
#endif
return 0; return 0;
} }

View File

@ -295,5 +295,9 @@ shutdown:
libssh2_exit(); libssh2_exit();
#ifdef _WIN32
WSACleanup();
#endif
return 0; return 0;
} }

View File

@ -225,5 +225,9 @@ shutdown:
libssh2_exit(); libssh2_exit();
#ifdef _WIN32
WSACleanup();
#endif
return 0; return 0;
} }

View File

@ -280,5 +280,9 @@ shutdown:
libssh2_exit(); libssh2_exit();
#ifdef _WIN32
WSACleanup();
#endif
return 0; return 0;
} }

View File

@ -291,5 +291,9 @@ shutdown:
libssh2_exit(); libssh2_exit();
#ifdef _WIN32
WSACleanup();
#endif
return 0; return 0;
} }

View File

@ -302,5 +302,9 @@ shutdown:
libssh2_exit(); libssh2_exit();
#ifdef _WIN32
WSACleanup();
#endif
return 0; return 0;
} }

View File

@ -242,5 +242,9 @@ shutdown:
libssh2_exit(); libssh2_exit();
#ifdef _WIN32
WSACleanup();
#endif
return 0; return 0;
} }

View File

@ -356,5 +356,9 @@ shutdown:
libssh2_exit(); libssh2_exit();
#ifdef _WIN32
WSACleanup();
#endif
return rc; return rc;
} }

View File

@ -245,5 +245,9 @@ shutdown:
libssh2_exit(); libssh2_exit();
#ifdef _WIN32
WSACleanup();
#endif
return rc; return rc;
} }

View File

@ -292,5 +292,9 @@ shutdown:
libssh2_exit(); libssh2_exit();
#ifdef _WIN32
WSACleanup();
#endif
return 0; return 0;
} }

View File

@ -365,5 +365,9 @@ shutdown:
libssh2_exit(); libssh2_exit();
#ifdef _WIN32
WSACleanup();
#endif
return exitcode; return exitcode;
} }

View File

@ -301,5 +301,9 @@ shutdown:
libssh2_exit(); libssh2_exit();
#ifdef _WIN32
WSACleanup();
#endif
return 0; return 0;
} }

View File

@ -300,5 +300,9 @@ shutdown:
libssh2_exit(); libssh2_exit();
#ifdef _WIN32
WSACleanup();
#endif
return 0; return 0;
} }

View File

@ -329,5 +329,9 @@ shutdown:
libssh2_exit(); libssh2_exit();
#ifdef _WIN32
WSACleanup();
#endif
return 0; return 0;
} }

View File

@ -477,6 +477,10 @@ void stop_openssh_fixture(void)
else if(have_docker) { else if(have_docker) {
fprintf(stderr, "Cannot stop container - none started\n"); fprintf(stderr, "Cannot stop container - none started\n");
} }
#ifdef _WIN32
WSACleanup();
#endif
} }
libssh2_socket_t open_socket_to_openssh_server(void) libssh2_socket_t open_socket_to_openssh_server(void)

View File

@ -269,5 +269,9 @@ shutdown:
libssh2_exit(); libssh2_exit();
#ifdef _WIN32
WSACleanup();
#endif
return rc; return rc;
} }