diff --git a/session/stream_session.h b/session/stream_session.h
index a3213980e0e03e644eb90546d4b8874c79eab865..2d14b7c4d7a1abd9965650d0bfb652a88553f927 100644
--- a/session/stream_session.h
+++ b/session/stream_session.h
@@ -38,7 +38,7 @@ struct stream_session {
 	unsigned int id;
 	unsigned int media_id;
 
-	enc_key_t * key;
+	dap_enc_key_t * key;
 
 	bool open_preview;
 	pthread_mutex_t mutex;
diff --git a/stream/stream.c b/stream/stream.c
index 2c04ed1b8602d49b5a08388eb8e6af84ffbd95d4..48403f171cfb70d6008b28ae15ffc2d706de8c01 100644
--- a/stream/stream.c
+++ b/stream/stream.c
@@ -20,11 +20,8 @@
 
 #include <stdlib.h>
 #include <stdio.h>
-#include "config.h"
 #include "dap_common.h"
 
-#include "db_core.h"
-#include "db_auth.h"
 #include "stream.h"
 #include "stream_pkt.h"
 #include "stream_ch.h"
@@ -62,7 +59,7 @@ int stream_init()
         return -1;
     }
 
-    log_it(NOTICE,"Init streaming module");
+    log_it(L_NOTICE,"Init streaming module");
     return 0;
 }
 
@@ -184,7 +181,7 @@ stream_t * stream_new(dap_http_client_t * sh)
 
     sh->internal=ret;
 
-    log_it(NOTICE,"New stream instance");
+    log_it(L_NOTICE,"New stream instance");
     return ret;
 }
 
@@ -355,5 +352,5 @@ void stream_delete(dap_http_client_t * sh, void * arg)
     for(i=0;i<sid->channel_count; i++)
         stream_ch_delete(sid->channel[i]);
     //free(sid);
-    log_it(NOTICE,"[core] Stream connection is finished");
+    log_it(L_NOTICE,"[core] Stream connection is finished");
 }
diff --git a/stream/stream_ch.c b/stream/stream_ch.c
index e76a88fc8395296a321e6bd8d3c14d8a24ed4bfa..0e378ba8e2191a10054c6f5bc7f1e8fb46b3e0c4 100644
--- a/stream/stream_ch.c
+++ b/stream/stream_ch.c
@@ -44,7 +44,7 @@ int stream_ch_init()
         log_it(L_CRITICAL,"Can't init stream channel packet submodule");
         return -1;
     }
-    log_it(NOTICE,"Module stream channel initialized");
+    log_it(L_NOTICE,"Module stream channel initialized");
     return 0;
 }
 
diff --git a/stream/stream_ch_proc.c b/stream/stream_ch_proc.c
index 1539f44e45b09faa22d1e7f82055fc868c23e90d..631399d70ee07a975b06f64c726359bee8417d41 100644
--- a/stream/stream_ch_proc.c
+++ b/stream/stream_ch_proc.c
@@ -32,7 +32,7 @@ stream_ch_proc_t proc[256]={0};
  */
 int stream_ch_proc_init()
 {
-    log_it(NOTICE, "Module stream channel types initialized");
+    log_it(L_NOTICE, "Module stream channel types initialized");
     return 0;
 }
 
diff --git a/stream/stream_pkt.c b/stream/stream_pkt.c
index 5bc491bd63ec663ac22897e12ee62b168f17a25b..24292f24a966879f5b822172e902cee1148ac5e1 100644
--- a/stream/stream_pkt.c
+++ b/stream/stream_pkt.c
@@ -21,7 +21,7 @@
 #include <stdint.h>
 #include <string.h>
 #include "dap_common.h"
-#include "config.h"
+//#include "config.h"
 
 
 #include "dap_client.h"
@@ -75,7 +75,7 @@ stream_pkt_t * stream_pkt_detect(void * data, uint32_t data_size)
  */
 size_t stream_pkt_read(struct stream * sid,struct stream_pkt * pkt, void * buf_out)
 {
-    size_t ds = enc_decode(sid->session->key,pkt->data,pkt->hdr.size,buf_out,ENC_DATA_TYPE_RAW);
+    size_t ds = enc_decode(sid->session->key,pkt->data,pkt->hdr.size,buf_out,DAP_ENC_DATA_TYPE_RAW);
 //    log_it(L_DEBUG,"Stream decoded %lu bytes ( last bytes 0x%02x 0x%02x 0x%02x 0x%02x ) ", ds,
 //           *((uint8_t *)buf_out+ds-4),*((uint8_t *)buf_out+ds-3),*((uint8_t *)buf_out+ds-2),*((uint8_t *)buf_out+ds-1)
 //           );
@@ -107,7 +107,7 @@ size_t stream_pkt_write(struct stream * sid, const void * data, uint32_t data_si
     memset(&pkt_hdr,0,sizeof(pkt_hdr));
     memcpy(pkt_hdr.sig,dap_sig,sizeof(pkt_hdr.sig));
 
-    pkt_hdr.size = enc_code(sid->session->key,data,data_size,sid->buf,ENC_DATA_TYPE_RAW);
+    pkt_hdr.size = enc_code(sid->session->key,data,data_size,sid->buf,DAP_ENC_DATA_TYPE_RAW);
 
     ret+=dap_client_write(sid->conn,&pkt_hdr,sizeof(pkt_hdr));
     ret+=dap_client_write(sid->conn,sid->buf,pkt_hdr.size);