Skip to content
Snippets Groups Projects
Commit 8df5741e authored by Constantin P.'s avatar Constantin P. 💬
Browse files

Merge branch 'hotfix-15105' into 'master'

hotfix-15105

See merge request !2051
parents f8e3812b 48937ec8
No related branches found
No related tags found
1 merge request!2051hotfix-15105
Pipeline #50466 passed with stage
in 15 minutes and 38 seconds
......@@ -1264,6 +1264,13 @@ static bool s_stream_ch_packet_in(dap_stream_ch_t *a_ch, void *a_arg)
return false;
}
pkt_test_t *l_request = (pkt_test_t*)l_ch_pkt->data;
if (dap_chain_net_srv_get(l_request->srv_uid) == NULL){
log_it(L_WARNING, "Can't find service with id %"DAP_UINT64_FORMAT_U, l_request->srv_uid);
l_err.code = DAP_STREAM_CH_CHAIN_NET_SRV_PKT_TYPE_RESPONSE_ERROR_CODE_SERVICE_NOT_FOUND;
dap_stream_ch_pkt_write_unsafe(a_ch, DAP_STREAM_CH_CHAIN_NET_SRV_PKT_TYPE_RESPONSE_ERROR_CODE_SERVICE_NOT_FOUND, &l_err, sizeof(l_err));
return false;
}
if (l_request->data_size_recv > DAP_CHAIN_NET_SRV_CH_REQUEST_SIZE_MAX || l_request->data_size > DAP_CHAIN_NET_SRV_CH_REQUEST_SIZE_MAX) {
log_it(L_WARNING, "Too large payload %zu [pkt seq %"DAP_UINT64_FORMAT_U"]", l_request->data_size_recv, l_ch_pkt->hdr.seq_id);
l_err.code = DAP_STREAM_CH_CHAIN_NET_SRV_PKT_TYPE_RESPONSE_ERROR_CODE_BIG_SIZE;
......
......@@ -331,7 +331,7 @@ void dap_chain_node_client_close_unsafe(dap_chain_node_client_t *a_node_client)
if (a_node_client->reconnect_timer)
dap_timerfd_delete_mt(a_node_client->reconnect_timer->worker, a_node_client->reconnect_timer->esocket_uuid);
if (a_node_client->callbacks.delete)
a_node_client->callbacks.delete(a_node_client, a_node_client->net);
a_node_client->callbacks.delete(a_node_client, a_node_client->callbacks_arg);
if (a_node_client->stream_worker) {
dap_stream_ch_t *l_ch = dap_stream_ch_find_by_uuid_unsafe(a_node_client->stream_worker, a_node_client->ch_chain_net_uuid);
......
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