Skip to content
Snippets Groups Projects
Commit 496ff626 authored by dmitriy.gerasimov's avatar dmitriy.gerasimov
Browse files

Merge branch 'feature-2841' into 'master'

fixed sprawling global_db

See merge request !10
parents 12773318 cd6d0975
No related branches found
No related tags found
1 merge request!10fixed sprawling global_db
...@@ -243,7 +243,7 @@ void s_stream_ch_packet_in(dap_stream_ch_t* a_ch, void* a_arg) ...@@ -243,7 +243,7 @@ void s_stream_ch_packet_in(dap_stream_ch_t* a_ch, void* a_arg)
l_ch_chain->request_last_ts = dap_db_log_get_last_id(); l_ch_chain->request_last_ts = dap_db_log_get_last_id();
log_it(L_DEBUG, "Requested transactions %llu:%llu", l_request->id_start, log_it(L_DEBUG, "Requested transactions %llu:%llu", l_request->id_start,
(uint64_t ) l_ch_chain->request_last_ts); (uint64_t ) l_ch_chain->request_last_ts);
dap_list_t *l_list = dap_db_log_get_list((time_t) l_request->id_start); dap_list_t *l_list = dap_db_log_get_list(l_request->id_start + 1);
log_it(L_DEBUG, "Got %u items", dap_list_length(l_list)); log_it(L_DEBUG, "Got %u items", dap_list_length(l_list));
if(l_list) { if(l_list) {
// Add it to outgoing list // Add it to outgoing list
...@@ -368,8 +368,10 @@ void s_stream_ch_packet_in(dap_stream_ch_t* a_ch, void* a_arg) ...@@ -368,8 +368,10 @@ void s_stream_ch_packet_in(dap_stream_ch_t* a_ch, void* a_arg)
//check whether to apply the received data into the database //check whether to apply the received data into the database
bool l_no_apply = false; bool l_no_apply = false;
if(l_obj->type == 'd' && !l_read_obj) { if(l_obj->type == 'd') {
l_no_apply = true; // already deleted
if(l_read_obj)
l_no_apply = true;
} }
else if(l_obj->type == 'a') { else if(l_obj->type == 'a') {
bool l_is_the_same_present = false; bool l_is_the_same_present = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment