From f77de1e95237248fd34598db7b70c4a957dfb49f Mon Sep 17 00:00:00 2001
From: Ivan Deniskin <ivanmordwin@yandex.ru>
Date: Tue, 27 Mar 2018 19:16:15 +0300
Subject: [PATCH] Build errors

---
 session/stream_session.h | 2 +-
 stream/stream.c          | 9 +++------
 stream/stream_ch.c       | 2 +-
 stream/stream_ch_proc.c  | 2 +-
 stream/stream_pkt.c      | 6 +++---
 5 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/session/stream_session.h b/session/stream_session.h
index a3213980e0..2d14b7c4d7 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 2c04ed1b86..48403f171c 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 e76a88fc83..0e378ba8e2 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 1539f44e45..631399d70e 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 5bc491bd63..24292f24a9 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);
-- 
GitLab