From 759d14c0db64edc69f0a41c76d00f60087dc7364 Mon Sep 17 00:00:00 2001 From: Dmitry Gerasimov <dmitriy.gerasimov@demlabs.net> Date: Thu, 25 Aug 2022 16:17:57 +0700 Subject: [PATCH] [*] Fixed --- modules/channel/chain-net-srv/dap_stream_ch_chain_net_srv.c | 6 ++++-- modules/channel/chain-voting/dap_stream_ch_chain_voting.c | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/channel/chain-net-srv/dap_stream_ch_chain_net_srv.c b/modules/channel/chain-net-srv/dap_stream_ch_chain_net_srv.c index 14344eb326..9b4a3b43b5 100644 --- a/modules/channel/chain-net-srv/dap_stream_ch_chain_net_srv.c +++ b/modules/channel/chain-net-srv/dap_stream_ch_chain_net_srv.c @@ -23,6 +23,8 @@ along with any CellFrame SDK based project. If not, see <http://www.gnu.org/lic */ #include <sys/time.h> +#include <time.h> +#include "dap_global_db.h" #include "dap_timerfd.h" #include "dap_hash.h" #include "rand/dap_rand.h" @@ -395,7 +397,7 @@ void s_stream_ch_packet_in(dap_stream_ch_t* a_ch , void* a_arg) l_request->err_code = 0; strncpy(l_request->ip_send, a_ch->stream->esocket->hostaddr, INET_ADDRSTRLEN); struct timespec l_recvtime2; - clck_gettime(CLOCK_REALTIME, &l_recvtime2); + clock_gettime(CLOCK_REALTIME, &l_recvtime2); l_request->recv_time2 = l_recvtime2; dap_stream_ch_pkt_write_unsafe(a_ch, DAP_STREAM_CH_CHAIN_NET_SRV_PKT_TYPE_CHECK_RESPONSE, l_request, @@ -534,7 +536,7 @@ void s_stream_ch_packet_in(dap_stream_ch_t* a_ch , void* a_arg) dap_hash_fast(l_receipt,l_receipt_size,&l_receipt_hash); char *l_receipt_hash_str = dap_chain_hash_fast_to_str_new(&l_receipt_hash); - dap_chain_global_db_gr_set(l_receipt_hash_str, l_receipt, l_receipt_size, "local.receipts"); + dap_global_db_set("local.receipts",l_receipt_hash_str, l_receipt, l_receipt_size,false, NULL, NULL); DAP_DELETE(l_receipt_hash_str); size_t l_success_size; diff --git a/modules/channel/chain-voting/dap_stream_ch_chain_voting.c b/modules/channel/chain-voting/dap_stream_ch_chain_voting.c index a615aa1ead..4b829261f2 100644 --- a/modules/channel/chain-voting/dap_stream_ch_chain_voting.c +++ b/modules/channel/chain-voting/dap_stream_ch_chain_voting.c @@ -299,7 +299,7 @@ static bool s_pkt_broadcast(dap_proc_thread_t * a_thread, void * a_arg) } - s_callback_channel_pkt_free(0); + //s_callback_channel_pkt_free(0); return true; } @@ -406,7 +406,7 @@ static void s_callback_pkt_items_send_all(dap_client_t *a_client, void *a_arg) l_pkts_list = l_pkts_list_next; } pthread_rwlock_unlock(&s_pkt_items->rwlock_out); - s_callback_channel_pkt_free(l_node_client->remote_node_addr.uint64); + // s_callback_channel_pkt_free(l_node_client->remote_node_addr.uint64); } } } -- GitLab