From f8b631abf3be7ab429175cbd9e71366b8aa2904c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Al=D0=B5x=D0=B0nder=20Lysik=D0=BEv?=
 <alexander.lysikov@demlabs.net>
Date: Fri, 13 Dec 2019 21:45:20 +0500
Subject: [PATCH] fixed dap_chain_net_srv_stream_session_create()

---
 dap_chain_net_srv_stream_session.c | 1 +
 dap_chain_net_srv_stream_session.h | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/dap_chain_net_srv_stream_session.c b/dap_chain_net_srv_stream_session.c
index 4cae523..09b4abd 100644
--- a/dap_chain_net_srv_stream_session.c
+++ b/dap_chain_net_srv_stream_session.c
@@ -42,6 +42,7 @@ dap_chain_net_srv_stream_session_t * dap_chain_net_srv_stream_session_create( da
     }
     dap_chain_net_srv_stream_session_t * l_session_srv= DAP_NEW_Z(dap_chain_net_srv_stream_session_t);
     a_session->_inheritor = l_session_srv;
+    l_session_srv->parent = a_session;
     log_it(L_NOTICE, "created service session");
     return  l_session_srv;
 }
diff --git a/dap_chain_net_srv_stream_session.h b/dap_chain_net_srv_stream_session.h
index 94f44f4..3df8c84 100644
--- a/dap_chain_net_srv_stream_session.h
+++ b/dap_chain_net_srv_stream_session.h
@@ -58,6 +58,8 @@ typedef struct dap_chain_net_srv_usage{
     UT_hash_handle hh; //
 } dap_chain_net_srv_usage_t;
 
+typedef void (*dap_response_success_callback_t) (dap_stream_ch_chain_net_srv_pkt_success_t*, void*);
+
 typedef struct dap_chain_net_srv_stream_session {
     dap_stream_session_t * parent;
     dap_chain_net_srv_usage_t * usages;
@@ -69,6 +71,10 @@ typedef struct dap_chain_net_srv_stream_session {
 
     time_t ts_activated;
     dap_sign_t* user_sign; // User's signature for auth if reconnect
+
+    dap_response_success_callback_t response_success_callback;
+    void *response_success_callback_data;
+
 } dap_chain_net_srv_stream_session_t;
 
 #define DAP_CHAIN_NET_SRV_STREAM_SESSION(a) ((dap_chain_net_srv_stream_session_t *) (a)->_inheritor )
-- 
GitLab