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

Merge branch 'bugs-4016' into 'master'

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

See merge request !97
parents 18384670 134c1e32
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 ...@@ -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 = (uint64_t) atoll ( l_price_str );
l_price_unit.uint32 = (uint32_t) atol ( l_price_unit_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); 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( 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_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) if (l_order_new_hash_str)
dap_string_append_printf( l_string_ret, "Created order %s\n", l_order_new_hash_str); dap_string_append_printf( l_string_ret, "Created order %s\n", l_order_new_hash_str);
else{ 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