From b601b629e541936be033912e59848105c3056e72 Mon Sep 17 00:00:00 2001 From: zhengshuxin Date: Fri, 23 Aug 2019 21:16:45 +0800 Subject: [PATCH] add acl::acl_cpp_init() for some samples which were needed by Windows OS. --- lib_acl_cpp/samples/socket/c1/main.cpp | 2 ++ lib_acl_cpp/samples/socket/c2/main.cpp | 1 + lib_acl_cpp/samples/socket/client/main.cpp | 2 ++ lib_acl_cpp/samples/socket/client2/main.cpp | 2 ++ lib_acl_cpp/samples/socket/s1/main.cpp | 2 ++ lib_acl_cpp/samples/socket/s2/main.cpp | 1 + lib_acl_cpp/samples/socket/server/main.cpp | 2 ++ 7 files changed, 12 insertions(+) diff --git a/lib_acl_cpp/samples/socket/c1/main.cpp b/lib_acl_cpp/samples/socket/c1/main.cpp index 177212a7d..7ef251d60 100644 --- a/lib_acl_cpp/samples/socket/c1/main.cpp +++ b/lib_acl_cpp/samples/socket/c1/main.cpp @@ -38,6 +38,8 @@ int main(int argc, char* argv[]) if (argc >= 2) addr = argv[1]; + acl::acl_cpp_init(); + int max = 100; std::vector conns; std::vector threads; diff --git a/lib_acl_cpp/samples/socket/c2/main.cpp b/lib_acl_cpp/samples/socket/c2/main.cpp index e6e555a6b..3d304927f 100644 --- a/lib_acl_cpp/samples/socket/c2/main.cpp +++ b/lib_acl_cpp/samples/socket/c2/main.cpp @@ -85,6 +85,7 @@ int main(int argc, char* argv[]) } } + acl::acl_cpp_init(); acl::log::stdout_open(true); std::vector threads; diff --git a/lib_acl_cpp/samples/socket/client/main.cpp b/lib_acl_cpp/samples/socket/client/main.cpp index e800de722..fffd34d7d 100644 --- a/lib_acl_cpp/samples/socket/client/main.cpp +++ b/lib_acl_cpp/samples/socket/client/main.cpp @@ -11,6 +11,8 @@ int main(int argc, char* argv[]) if (argc >= 2) addr = argv[1]; + acl::acl_cpp_init(); + if (client.open(addr, 0, 0) == false) { printf("open %s error\n", addr.c_str()); diff --git a/lib_acl_cpp/samples/socket/client2/main.cpp b/lib_acl_cpp/samples/socket/client2/main.cpp index 034d342d9..439c4c3b6 100644 --- a/lib_acl_cpp/samples/socket/client2/main.cpp +++ b/lib_acl_cpp/samples/socket/client2/main.cpp @@ -15,6 +15,8 @@ int main(int argc, char* argv[]) if (argc >= 2) addr = argv[1]; + acl::acl_cpp_init(); + if (client.open(addr, 0, 0) == false) { printf("open %s error\n", addr.c_str()); diff --git a/lib_acl_cpp/samples/socket/s1/main.cpp b/lib_acl_cpp/samples/socket/s1/main.cpp index 8ada8aac9..b4ead9113 100644 --- a/lib_acl_cpp/samples/socket/s1/main.cpp +++ b/lib_acl_cpp/samples/socket/s1/main.cpp @@ -11,6 +11,8 @@ int main(int argc, char* argv[]) if (argc >= 2) addr = argv[1]; + acl::acl_cpp_init(); + if (server.open(addr) == false) { printf("open %s error\r\n", addr.c_str()); diff --git a/lib_acl_cpp/samples/socket/s2/main.cpp b/lib_acl_cpp/samples/socket/s2/main.cpp index 2c9f5789e..2df526888 100644 --- a/lib_acl_cpp/samples/socket/s2/main.cpp +++ b/lib_acl_cpp/samples/socket/s2/main.cpp @@ -37,6 +37,7 @@ int main(int argc, char* argv[]) acl::server_socket server; acl::string addr = "127.0.0.1:9001"; + acl::acl_cpp_init(); acl::log::stdout_open(true); if (argc >= 2) diff --git a/lib_acl_cpp/samples/socket/server/main.cpp b/lib_acl_cpp/samples/socket/server/main.cpp index ed5d3e784..4baca8252 100644 --- a/lib_acl_cpp/samples/socket/server/main.cpp +++ b/lib_acl_cpp/samples/socket/server/main.cpp @@ -10,6 +10,8 @@ int main(int argc, char* argv[]) if (argc >= 2) addr = argv[1]; + acl::acl_cpp_init(); + if (server.open(addr) == false) { printf("open %s error\r\n", addr.c_str());