Skip to content
Snippets Groups Projects
Commit 134c1e32 authored by Aleksei Voronin's avatar Aleksei Voronin
Browse files

[*] fixed node segfault while creating vpn-order with no -ext specified'

parent 44448a4a
No related branches found
No related tags found
1 merge request!97[*] fixed node segfault while creating vpn-order with no -ext specified
......@@ -455,9 +455,10 @@ static int s_cli_net_srv( int argc, char **argv, void *arg_func, char **a_str_re
l_price = (uint64_t) atoll ( l_price_str );
l_price_unit.uint32 = (uint32_t) atol ( l_price_unit_str );
strncpy(l_price_token, l_price_token_str, DAP_CHAIN_TICKER_SIZE_MAX - 1);
size_t l_ext_len = l_ext? strlen(l_ext) + 1 : 0;
char * l_order_new_hash_str = dap_chain_net_srv_order_create(
l_net,l_direction, l_srv_uid, l_node_addr,l_tx_cond_hash, l_price, l_price_unit,
l_price_token, l_expires, (uint8_t *)l_ext, strlen(l_ext) + 1, l_region_str, l_continent_num);
l_price_token, l_expires, (uint8_t *)l_ext, l_ext_len, l_region_str, l_continent_num);
if (l_order_new_hash_str)
dap_string_append_printf( l_string_ret, "Created order %s\n", l_order_new_hash_str);
else{
......
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