diff --git a/.gitignore b/.gitignore index 7842fb2c552c60e7a0378a5634fb1c15f40fb4b0..15cef3cea89f1889fb9e7788be912afa92240236 100755 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ # Prerequisites *.d - +build/ # Object files *.o *.ko diff --git a/.gitmodules b/.gitmodules index 2f6812d7f2ac3bafa0dc113a385ed5df4203788d..b517017dd62287b2591dfc248ea63ec530087ad3 100755 --- a/.gitmodules +++ b/.gitmodules @@ -1,21 +1,32 @@ [submodule "libdap"] path = libdap url = https://github.com/kelvinblockchain/libdap + branch = master [submodule "libdap-server-core"] path = libdap-server-core url = https://github.com/kelvinblockchain/libdap-server-core + branch = master [submodule "libdap-server"] path = libdap-server url = https://github.com/kelvinblockchain/libdap-server + branch = master [submodule "libdap-server-udp"] path = libdap-server-udp url = https://github.com/kelvinblockchain/libdap-server-udp + branch = master [submodule "test/libdap-test"] path = test/libdap-test url = https://github.com/kelvinblockchain/libdap-test + branch = master [submodule "test/libdap-stream-ch"] path = libdap-stream-ch url = https://github.com/kelvinblockchain/libdap-stream-ch + branch = master [submodule "libdap-stream-ch"] path = libdap-stream-ch url = https://github.com/kelvinblockchain/libdap-stream-ch + branch = master +[submodule "libdap-crypto"] + path = libdap-crypto + url = https://github.com/cellframe/libdap-crypto + branch = master diff --git a/.travis.yml b/.travis.yml index d72fddccc314982de860fff51a5ef9b3f116cbb9..ff468b80fc6b94d0f13473bfcd4a9966403539f2 100755 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ notifications: before_install: - git submodule init - - git submodule update --recursive + - git submodule update script: - mkdir build diff --git a/CMakeLists.txt b/CMakeLists.txt index a1907e41158f27483530edc740d253069b6b192f..fcb7b586a795d02d18d1905bba9e1867542b10a5 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,11 +3,28 @@ cmake_minimum_required(VERSION 3.0) if(NOT (${SUBMODULES_NO_BUILD} MATCHES ON)) set(SUBMODULES_NO_BUILD ON) - add_subdirectory(libdap) - add_subdirectory(libdap-server) - add_subdirectory(libdap-server-core) - add_subdirectory(libdap-server-udp) - add_subdirectory(libdap-stream-ch) + if ( NOT ( TARGET dap_core ) ) + add_subdirectory(libdap) + endif() + if ( NOT ( TARGET dap_crypto ) ) + add_subdirectory(libdap-crypto) + endif() + + if ( NOT ( TARGET libdap-server ) ) + add_subdirectory(libdap-server) + endif() + + if ( NOT ( TARGET dap_core_server ) ) + add_subdirectory(libdap-server-core) + endif() + + if ( NOT ( TARGET dap_server_udp ) ) + add_subdirectory(libdap-server-udp) + endif() + + if ( NOT ( TARGET dap_stream_ch ) ) + add_subdirectory(libdap-stream-ch) + endif() endif() if(BUILD_DAP_STREAM_TESTS) diff --git a/libdap b/libdap index 999a4bc46231c2398a8d010dee06628965b3c478..4ab41cdcaa8087323652cd5fef702876ccc25dab 160000 --- a/libdap +++ b/libdap @@ -1 +1 @@ -Subproject commit 999a4bc46231c2398a8d010dee06628965b3c478 +Subproject commit 4ab41cdcaa8087323652cd5fef702876ccc25dab diff --git a/libdap-crypto b/libdap-crypto new file mode 160000 index 0000000000000000000000000000000000000000..ff63d762657f9687173db825705b8bf4b958abee --- /dev/null +++ b/libdap-crypto @@ -0,0 +1 @@ +Subproject commit ff63d762657f9687173db825705b8bf4b958abee diff --git a/libdap-server b/libdap-server index 1b3a871d6ec93801f14081de51157bbb703593f1..2cc113d3ef8234037016ac21f33731998bba6552 160000 --- a/libdap-server +++ b/libdap-server @@ -1 +1 @@ -Subproject commit 1b3a871d6ec93801f14081de51157bbb703593f1 +Subproject commit 2cc113d3ef8234037016ac21f33731998bba6552 diff --git a/libdap-server-core b/libdap-server-core index 7c6065bc699760e6e66ee4e80861a3562b2366c1..7b9bd8a0bc0d948086fd0759df0e99154be58750 160000 --- a/libdap-server-core +++ b/libdap-server-core @@ -1 +1 @@ -Subproject commit 7c6065bc699760e6e66ee4e80861a3562b2366c1 +Subproject commit 7b9bd8a0bc0d948086fd0759df0e99154be58750 diff --git a/libdap-server-udp b/libdap-server-udp index 19a6376646f497d97bfe1ea3fade1a907c32f76a..bbf1b9db2c3af9a3a59f6debb90ddc8db55ae2eb 160000 --- a/libdap-server-udp +++ b/libdap-server-udp @@ -1 +1 @@ -Subproject commit 19a6376646f497d97bfe1ea3fade1a907c32f76a +Subproject commit bbf1b9db2c3af9a3a59f6debb90ddc8db55ae2eb diff --git a/libdap-stream-ch b/libdap-stream-ch index dfbdaa1df0498069e60ffaf42de963375bffa816..268f422bde88a5f4f254a31b7d52b18d2cad71fc 160000 --- a/libdap-stream-ch +++ b/libdap-stream-ch @@ -1 +1 @@ -Subproject commit dfbdaa1df0498069e60ffaf42de963375bffa816 +Subproject commit 268f422bde88a5f4f254a31b7d52b18d2cad71fc diff --git a/session/dap_stream_session.c b/session/dap_stream_session.c index ffb7a6d89ccb8a05d4534756a2bbc2505c5feb63..b511e1da922f577bf195c5e1de037edb0235ac96 100644 --- a/session/dap_stream_session.c +++ b/session/dap_stream_session.c @@ -73,7 +73,6 @@ dap_stream_session_t * dap_stream_session_pure_new() { dap_stream_session_t * ret=NULL; - printf("pire new\n" ); unsigned int session_id=0,session_id_new=0; do{ session_id_new=session_id=rand()+rand()*0x100+rand()*0x10000+rand()*0x01000000; @@ -89,7 +88,6 @@ dap_stream_session_t * dap_stream_session_pure_new() log_it(L_DEBUG,"Timestamp %u",(unsigned int) ret->time_created); HASH_ADD_INT(sessions,id,ret); - printf("puew new ok\n" ); return ret; } @@ -126,8 +124,6 @@ int dap_stream_session_close(unsigned int id) return -1; } - printf("close ses ok\n" ); - return stream_session_close2(l_s); } @@ -141,12 +137,10 @@ int stream_session_close2(dap_stream_session_t * s) int dap_stream_session_open(dap_stream_session_t * ss) { - printf("close open\n" ); int ret; pthread_mutex_lock(&ss->mutex); ret=ss->opened; if(ss->opened==0) ss->opened=1; pthread_mutex_unlock(&ss->mutex); - printf("close open ok\n" ); return ret; } diff --git a/stream/CMakeLists.txt b/stream/CMakeLists.txt index d093515fca998a330d3fcde5975f3f84f6e0d50e..5f6243ab4e3356649cbb70f7c4f845ecbff00d77 100755 --- a/stream/CMakeLists.txt +++ b/stream/CMakeLists.txt @@ -8,7 +8,7 @@ set(STREAM_SRCS add_library(${PROJECT_NAME} STATIC ${STREAM_SRCS}) -target_link_libraries(dap_stream dap_core dap_udp_server dap_crypto +target_link_libraries(dap_stream dap_core dap_server_core dap_udp_server dap_crypto dap_http_server dap_enc_server dap_session dap_stream_ch) target_include_directories(dap_stream INTERFACE .)