From 8204215d5eae93737d4913cf9ee7586f9aee3192 Mon Sep 17 00:00:00 2001 From: Constantin Papizh <p.const@bk.ru> Date: Sun, 19 Apr 2020 18:11:13 +0300 Subject: [PATCH] Windows conserver issues fixed --- cellframe-sdk | 2 +- sources/main_node_cli.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cellframe-sdk b/cellframe-sdk index 089e77898..c28cf7f7b 160000 --- a/cellframe-sdk +++ b/cellframe-sdk @@ -1 +1 @@ -Subproject commit 089e77898b3b073ec6578358eda99fe52c49ecc8 +Subproject commit c28cf7f7b5680a87193ffc68733372c31dc2b37f diff --git a/sources/main_node_cli.c b/sources/main_node_cli.c index 695188754..a2097c373 100644 --- a/sources/main_node_cli.c +++ b/sources/main_node_cli.c @@ -227,6 +227,8 @@ int main(int argc, const char *argv[]) const char* listen_socket = dap_config_get_item_str( g_config, "conserver", "listen_unix_socket_path"); // unix socket mode #else const char* listen_socket = NULL; + WSADATA wsaData; + WSAStartup(MAKEWORD(2,2), &wsaData); #endif cparam = dap_app_cli_connect(listen_socket); @@ -261,12 +263,18 @@ int main(int argc, const char *argv[]) // Send command int res = dap_app_cli_post_command(cparam, &cmd); dap_app_cli_disconnect(cparam); +#ifdef _WIN32 + WSACleanup(); +#endif return res; }else{ // command not found, start interactive shell shell_reader_loop(); dap_app_cli_disconnect(cparam); } +#ifdef _WIN32 + WSACleanup(); +#endif return 0; } -- GitLab