Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libdap-stream-ch-chain
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
cellframe
libdap-stream-ch-chain
Commits
001748d4
Commit
001748d4
authored
5 years ago
by
dmitriy.gerasimov
Browse files
Options
Downloads
Plain Diff
Merge branch 'feature-3245' into 'master'
fixed chain sync See merge request
!13
parents
429013c8
cfd1b04d
No related branches found
Branches containing commit
No related tags found
1 merge request
!13
fixed chain sync
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dap_stream_ch_chain.c
+12
-12
12 additions, 12 deletions
dap_stream_ch_chain.c
with
12 additions
and
12 deletions
dap_stream_ch_chain.c
+
12
−
12
View file @
001748d4
...
@@ -550,10 +550,6 @@ void s_stream_ch_packet_out(dap_stream_ch_t* a_ch, void* a_arg)
...
@@ -550,10 +550,6 @@ void s_stream_ch_packet_out(dap_stream_ch_t* a_ch, void* a_arg)
//dap_list_t *l_list = l_ch_chain->request_global_db_trs; //dap_list_last( l_ch_chain->request_global_db_trs );
//dap_list_t *l_list = l_ch_chain->request_global_db_trs; //dap_list_last( l_ch_chain->request_global_db_trs );
bool
l_is_stop
=
true
;
//l_list ? false : true;
bool
l_is_stop
=
true
;
//l_list ? false : true;
while
(
l_obj
)
{
while
(
l_obj
)
{
//log_it(L_DEBUG, "l_list = %X", l_list);
//size_t len = dap_list_length( l_list );
//log_it( L_DEBUG,"len = dap_list_length(l_list ); = %u", len );
//log_it( L_DEBUG,"l_list->data = %p", l_list->data );
size_t
l_items_total
=
dap_db_log_list_get_count
(
l_db_list
);
size_t
l_items_total
=
dap_db_log_list_get_count
(
l_db_list
);
size_t
l_items_rest
=
dap_db_log_list_get_count_rest
(
l_db_list
);
size_t
l_items_rest
=
dap_db_log_list_get_count_rest
(
l_db_list
);
...
@@ -658,7 +654,7 @@ void s_stream_ch_packet_out(dap_stream_ch_t* a_ch, void* a_arg)
...
@@ -658,7 +654,7 @@ void s_stream_ch_packet_out(dap_stream_ch_t* a_ch, void* a_arg)
dap_chain_t * l_chain = l_ch_chain->request_atom_iter->chain;
dap_chain_t * l_chain = l_ch_chain->request_atom_iter->chain;
*/
*/
dap_chain_atom_item_t
*
l_atom_item
=
NULL
,
*
l_atom_item_tmp
=
NULL
,
*
l_chains_lasts_new
=
NULL
;
dap_chain_atom_item_t
*
l_atom_item
=
NULL
,
*
l_atom_item_tmp
=
NULL
;
//
, *l_chains_lasts_new = NULL;
if
(
l_ch_chain
->
request_atoms_lasts
==
NULL
)
{
// All chains synced
if
(
l_ch_chain
->
request_atoms_lasts
==
NULL
)
{
// All chains synced
dap_stream_ch_chain_sync_request_t
l_request
=
{
{
0
}
};
dap_stream_ch_chain_sync_request_t
l_request
=
{
{
0
}
};
uint8_t
l_send_pkt_type
=
l_ch_chain
->
state
==
CHAIN_STATE_SYNC_CHAINS
?
uint8_t
l_send_pkt_type
=
l_ch_chain
->
state
==
CHAIN_STATE_SYNC_CHAINS
?
...
@@ -674,7 +670,7 @@ void s_stream_ch_packet_out(dap_stream_ch_t* a_ch, void* a_arg)
...
@@ -674,7 +670,7 @@ void s_stream_ch_packet_out(dap_stream_ch_t* a_ch, void* a_arg)
if
(
l_ch_chain
->
callback_notify_packet_out
)
if
(
l_ch_chain
->
callback_notify_packet_out
)
l_ch_chain
->
callback_notify_packet_out
(
l_ch_chain
,
l_send_pkt_type
,
NULL
,
0
,
l_ch_chain
->
callback_notify_arg
);
l_ch_chain
->
callback_notify_packet_out
(
l_ch_chain
,
l_send_pkt_type
,
NULL
,
0
,
l_ch_chain
->
callback_notify_arg
);
}
}
// Process
all chains
lasts
// Process
one chain from l_ch_chain->request_atoms_
lasts
HASH_ITER
(
hh
,
l_ch_chain
->
request_atoms_lasts
,
l_atom_item
,
l_atom_item_tmp
)
HASH_ITER
(
hh
,
l_ch_chain
->
request_atoms_lasts
,
l_atom_item
,
l_atom_item_tmp
)
{
{
dap_chain_atom_item_t
*
l_atom_item_proc
=
NULL
;
dap_chain_atom_item_t
*
l_atom_item_proc
=
NULL
;
...
@@ -715,21 +711,25 @@ void s_stream_ch_packet_out(dap_stream_ch_t* a_ch, void* a_arg)
...
@@ -715,21 +711,25 @@ void s_stream_ch_packet_out(dap_stream_ch_t* a_ch, void* a_arg)
l_link_item
=
DAP_NEW_Z
(
dap_chain_atom_item_t
);
l_link_item
=
DAP_NEW_Z
(
dap_chain_atom_item_t
);
l_link_item
->
atom
=
l_links
[
i
];
// do not use memory cause it will be deleted
l_link_item
->
atom
=
l_links
[
i
];
// do not use memory cause it will be deleted
memcpy
(
&
l_link_item
->
atom_hash
,
&
l_link_hash
,
sizeof
(
l_link_hash
));
memcpy
(
&
l_link_item
->
atom_hash
,
&
l_link_hash
,
sizeof
(
l_link_hash
));
HASH_ADD
(
hh
,
l_chains_lasts_new
,
atom_hash
,
sizeof
(
l_link_hash
),
l_link_item
);
//HASH_ADD(hh, l_chains_lasts_new, atom_hash, sizeof(l_link_hash), l_link_item);
HASH_ADD
(
hh
,
l_ch_chain
->
request_atoms_lasts
,
atom_hash
,
sizeof
(
l_link_hash
),
l_link_item
);
}
}
//else
//else
// DAP_DELETE(l_links[i]);
// DAP_DELETE(l_links[i]);
}
}
DAP_DELETE
(
l_links
);
DAP_DELETE
(
l_links
);
HASH_DEL
(
l_ch_chain
->
request_atoms_lasts
,
l_atom_item
);
break
;
}
else
{
HASH_DEL
(
l_ch_chain
->
request_atoms_lasts
,
l_atom_item
);
}
}
HASH_DEL
(
l_ch_chain
->
request_atoms_lasts
,
l_atom_item
);
}
}
assert
(
l_ch_chain
->
request_atoms_lasts
==
NULL
);
//assert(l_ch_chain->request_atoms_lasts == NULL);
l_ch_chain
->
request_atoms_lasts
=
l_chains_lasts_new
;
//l_ch_chain->request_atoms_lasts = l_chains_lasts_new;
}
}
break
;
break
;
}
}
if
(
l_ch_chain
->
state
==
CHAIN_STATE_SYNC_ALL
)
{
if
(
l_ch_chain
->
state
==
CHAIN_STATE_SYNC_ALL
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment