Skip to content
Snippets Groups Projects
Commit f5fc13b5 authored by Dmitriy Gerasimov's avatar Dmitriy Gerasimov
Browse files

[*] Fixed UUID search for NULL worker. Need to find, where it happens.

parent e9c8d709
No related branches found
No related tags found
2 merge requests!330features-4787,!326Release 2.9
Pipeline #7924 passed with stage
in 3 seconds
...@@ -2,7 +2,7 @@ project(cellframe-sdk C) ...@@ -2,7 +2,7 @@ project(cellframe-sdk C)
cmake_minimum_required(VERSION 3.0) cmake_minimum_required(VERSION 3.0)
set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD 11)
set(CELLFRAME_SDK_NATIVE_VERSION "2.9-24") set(CELLFRAME_SDK_NATIVE_VERSION "2.9-25")
add_definitions ("-DCELLFRAME_SDK_VERSION=\"${CELLFRAME_SDK_NATIVE_VERSION}\"") add_definitions ("-DCELLFRAME_SDK_VERSION=\"${CELLFRAME_SDK_NATIVE_VERSION}\"")
set(DAPSDK_MODULES "") set(DAPSDK_MODULES "")
message("Cellframe modules: ${CELLFRAME_MODULES}") message("Cellframe modules: ${CELLFRAME_MODULES}")
......
...@@ -149,7 +149,10 @@ void dap_stream_ch_delete(dap_stream_ch_t *a_ch) ...@@ -149,7 +149,10 @@ void dap_stream_ch_delete(dap_stream_ch_t *a_ch)
*/ */
dap_stream_ch_t * dap_stream_ch_find_by_uuid_unsafe(dap_stream_worker_t * a_worker, dap_stream_ch_uuid_t a_ch_uuid) dap_stream_ch_t * dap_stream_ch_find_by_uuid_unsafe(dap_stream_worker_t * a_worker, dap_stream_ch_uuid_t a_ch_uuid)
{ {
if ( a_worker->channels){ if( a_worker == NULL ){
log_it(L_WARNING,"Attempt to search for uuid 0x%016llu in NULL worker", a_ch_uuid);
return NULL;
} else if ( a_worker->channels){
dap_stream_ch_t * l_ch = NULL; dap_stream_ch_t * l_ch = NULL;
pthread_rwlock_rdlock(&a_worker->channels_rwlock); pthread_rwlock_rdlock(&a_worker->channels_rwlock);
HASH_FIND(hh_worker,a_worker->channels ,&a_ch_uuid, sizeof(a_ch_uuid), l_ch ); HASH_FIND(hh_worker,a_worker->channels ,&a_ch_uuid, sizeof(a_ch_uuid), l_ch );
......
...@@ -483,6 +483,7 @@ static void s_node_link_callback_connected(dap_chain_node_client_t * a_node_clie ...@@ -483,6 +483,7 @@ static void s_node_link_callback_connected(dap_chain_node_client_t * a_node_clie
a_node_client->ch_chain_net = dap_client_get_stream_ch_unsafe(a_node_client->client,dap_stream_ch_chain_get_id() ); a_node_client->ch_chain_net = dap_client_get_stream_ch_unsafe(a_node_client->client,dap_stream_ch_chain_get_id() );
if(a_node_client->ch_chain_net) if(a_node_client->ch_chain_net)
a_node_client->ch_chain_net_uuid = a_node_client->ch_chain_net->uuid; a_node_client->ch_chain_net_uuid = a_node_client->ch_chain_net->uuid;
dap_stream_ch_chain_pkt_write_unsafe( a_node_client->ch_chain , dap_stream_ch_chain_pkt_write_unsafe( a_node_client->ch_chain ,
DAP_STREAM_CH_CHAIN_PKT_TYPE_UPDATE_GLOBAL_DB_REQ, l_net->pub.id.uint64, DAP_STREAM_CH_CHAIN_PKT_TYPE_UPDATE_GLOBAL_DB_REQ, l_net->pub.id.uint64,
l_chain_id.uint64, l_net->pub.cell_id.uint64, &l_sync_gdb, sizeof(l_sync_gdb)); l_chain_id.uint64, l_net->pub.cell_id.uint64, &l_sync_gdb, sizeof(l_sync_gdb));
......
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