From b48e08d435447692263ad1370be79068254037f7 Mon Sep 17 00:00:00 2001
From: Dmitriy Gerasimov <naeper@demlabs.net>
Date: Wed, 5 Jun 2019 15:50:44 +0700
Subject: [PATCH] [*] Massive update

---
 .gitignore                   |  2 +-
 .gitmodules                  | 11 +++++++++++
 .travis.yml                  |  2 +-
 CMakeLists.txt               | 27 ++++++++++++++++++++++-----
 libdap                       |  2 +-
 libdap-crypto                |  1 +
 libdap-server                |  2 +-
 libdap-server-core           |  2 +-
 libdap-server-udp            |  2 +-
 libdap-stream-ch             |  2 +-
 session/dap_stream_session.c |  6 ------
 stream/CMakeLists.txt        |  2 +-
 12 files changed, 42 insertions(+), 19 deletions(-)
 create mode 160000 libdap-crypto

diff --git a/.gitignore b/.gitignore
index 7842fb2..15cef3c 100755
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,6 @@
 # Prerequisites
 *.d
-
+build/
 # Object files
 *.o
 *.ko
diff --git a/.gitmodules b/.gitmodules
index 2f6812d..b517017 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 d72fddc..ff468b8 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 a1907e4..fcb7b58 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 999a4bc..4ab41cd 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 0000000..ff63d76
--- /dev/null
+++ b/libdap-crypto
@@ -0,0 +1 @@
+Subproject commit ff63d762657f9687173db825705b8bf4b958abee
diff --git a/libdap-server b/libdap-server
index 1b3a871..2cc113d 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 7c6065b..7b9bd8a 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 19a6376..bbf1b9d 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 dfbdaa1..268f422 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 ffb7a6d..b511e1d 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 d093515..5f6243a 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 .)
-- 
GitLab