From d85cd8195043fc8a4624d3b91d53babd2cffcd4e Mon Sep 17 00:00:00 2001 From: Olzhas <oljas.jarasbaev@demlabs.net> Date: Wed, 6 Mar 2024 12:09:51 +0700 Subject: [PATCH 1/3] [*] bugfix-10810 --- net/server/json_rpc/rpc_core/src/dap_json_rpc_response.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/server/json_rpc/rpc_core/src/dap_json_rpc_response.c b/net/server/json_rpc/rpc_core/src/dap_json_rpc_response.c index fb8019d69..681d3ff1c 100644 --- a/net/server/json_rpc/rpc_core/src/dap_json_rpc_response.c +++ b/net/server/json_rpc/rpc_core/src/dap_json_rpc_response.c @@ -26,9 +26,8 @@ dap_json_rpc_response_t* dap_json_rpc_response_create(void * result, dap_json_rp response->id = id; json_object* errors = dap_json_rpc_error_get(); + response->type = type; if (!errors) { - response->type = type; - switch(response->type){ case TYPE_RESPONSE_STRING: response->result_string = (char*)result; break; -- GitLab From ea3dca72a4cd1e38f03276b670e4867504bcd10d Mon Sep 17 00:00:00 2001 From: Olzhas <oljas.jarasbaev@demlabs.net> Date: Wed, 6 Mar 2024 15:58:55 +0700 Subject: [PATCH 2/3] [*] bugfix-10810 --- net/server/cli_server/dap_cli_server.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/server/cli_server/dap_cli_server.c b/net/server/cli_server/dap_cli_server.c index 548f57716..0ff742f70 100644 --- a/net/server/cli_server/dap_cli_server.c +++ b/net/server/cli_server/dap_cli_server.c @@ -702,7 +702,9 @@ int json_commands(const char * a_name) { "tx_history", "mempool", "chain_ca_copy", - "ledger" + "ledger", + "net", + "wallet" }; for (size_t i = 0; i < sizeof(long_cmd)/sizeof(long_cmd[0]); i++) { if (!strcmp(a_name, long_cmd[i])) { -- GitLab From 125d7be6ef918f9b286af9aa4ffb78217988fa96 Mon Sep 17 00:00:00 2001 From: Olzhas <oljas.jarasbaev@demlabs.net> Date: Thu, 7 Mar 2024 17:16:16 +0700 Subject: [PATCH 3/3] [*] warning fix --- net/server/json_rpc/rpc_core/src/dap_json_rpc_request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/server/json_rpc/rpc_core/src/dap_json_rpc_request.c b/net/server/json_rpc/rpc_core/src/dap_json_rpc_request.c index 18f372f3a..1cbed8dcd 100644 --- a/net/server/json_rpc/rpc_core/src/dap_json_rpc_request.c +++ b/net/server/json_rpc/rpc_core/src/dap_json_rpc_request.c @@ -92,7 +92,7 @@ char *dap_json_rpc_request_to_json_string(const dap_json_rpc_request_t *a_reques } char *l_str = dap_strdup_printf( - "{\"method\":\"%s\", \"params\":%s, \"id\":\"%llu\" }", + "{\"method\":\"%s\", \"params\":%s, \"id\":\"%lu\" }", a_request->method, params_json, a_request->id); DAP_FREE(params_json); -- GitLab