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

Merge branch 'hotfix-4943' into 'master'

hotfix-4943

See merge request !253
parents ff304482 e0d10bba
No related branches found
No related tags found
1 merge request!253hotfix-4943
...@@ -8,7 +8,7 @@ set(CMAKE_C_STANDARD 11) ...@@ -8,7 +8,7 @@ set(CMAKE_C_STANDARD 11)
SET( CPACK_PACKAGE_NAME "${PROJECT_NAME}") SET( CPACK_PACKAGE_NAME "${PROJECT_NAME}")
SET( CPACK_PACKAGE_VERSION_MAJOR 4) SET( CPACK_PACKAGE_VERSION_MAJOR 4)
SET( CPACK_PACKAGE_VERSION_MINOR 4) SET( CPACK_PACKAGE_VERSION_MINOR 4)
SET( CPACK_PACKAGE_VERSION_PATCH 55) SET( CPACK_PACKAGE_VERSION_PATCH 56)
# init CellFrame SDK # init CellFrame SDK
add_definitions("-DDAP_VERSION=\"${CPACK_PACKAGE_VERSION_MAJOR}-${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}\"") add_definitions("-DDAP_VERSION=\"${CPACK_PACKAGE_VERSION_MAJOR}-${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}\"")
......
Subproject commit 39f0cc65878ee1a6b089f8a44edd6afff3753a66 Subproject commit 0077fa15b62f64185ea8f1de3137261c2235bf84
...@@ -4,10 +4,11 @@ ...@@ -4,10 +4,11 @@
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
#include <stdbool.h> #include <stdbool.h>
#include <conio.h>
#include "dap_common.h" #include "dap_common.h"
DWORD ExceptionFilter( EXCEPTION_POINTERS *ep ); LONG ExceptionFilter( EXCEPTION_POINTERS *ep );
void S_SetExceptionFilter( void ) void S_SetExceptionFilter( void )
{ {
...@@ -33,7 +34,7 @@ typedef struct _EXCEPTION_RECORD { ...@@ -33,7 +34,7 @@ typedef struct _EXCEPTION_RECORD {
} EXCEPTION_RECORD; } EXCEPTION_RECORD;
#endif #endif
DWORD ExceptionFilter( EXCEPTION_POINTERS *ep ) LONG ExceptionFilter( EXCEPTION_POINTERS *ep )
{ {
// printf( "\r\nExceptionCode = 0x%0X[%s]\r\n", ep->ExceptionRecord->ExceptionCode, buff ); // printf( "\r\nExceptionCode = 0x%0X[%s]\r\n", ep->ExceptionRecord->ExceptionCode, buff );
...@@ -85,7 +86,7 @@ DWORD ExceptionFilter( EXCEPTION_POINTERS *ep ) ...@@ -85,7 +86,7 @@ DWORD ExceptionFilter( EXCEPTION_POINTERS *ep )
HANDLE hConOut = GetStdHandle( STD_OUTPUT_HANDLE ); HANDLE hConOut = GetStdHandle( STD_OUTPUT_HANDLE );
SetConsoleTextAttribute( hConOut, 12 ); SetConsoleTextAttribute( hConOut, 12 );
printf( "\r\nExceptionCode = 0x%0X[%s]\r\n", ep->ExceptionRecord->ExceptionCode, buff ); printf( "\r\nExceptionCode = 0x%0lX[%s]\r\n", ep->ExceptionRecord->ExceptionCode, buff );
SetConsoleTextAttribute( hConOut, 7 ); SetConsoleTextAttribute( hConOut, 7 );
......
...@@ -138,7 +138,7 @@ void exit_if_server_already_running( void ); ...@@ -138,7 +138,7 @@ void exit_if_server_already_running( void );
static const char *s_pid_file_path = NULL; static const char *s_pid_file_path = NULL;
bool dap_chain_net_srv_pay_verificator(dap_chain_tx_out_cond_t *a_cond, dap_chain_datum_tx_t *a_tx) { return true; } bool dap_chain_net_srv_pay_verificator(dap_chain_tx_out_cond_t *a_cond, dap_chain_datum_tx_t *a_tx) { UNUSED(a_cond); UNUSED(a_tx); return true; }
#ifdef __ANDROID__ #ifdef __ANDROID__
int cellframe_node_Main(int argc, const char **argv) int cellframe_node_Main(int argc, const char **argv)
...@@ -591,8 +591,8 @@ void exit_if_server_already_running( void ) { ...@@ -591,8 +591,8 @@ void exit_if_server_already_running( void ) {
#endif #endif
if ( (pid != 0 && is_process_running(pid)) || mf ) { if ( (pid != 0 && is_process_running(pid)) || mf ) {
log_it( L_WARNING, "Proccess %d is running, don't allow " log_it( L_WARNING, "Proccess %"DAP_UINT64_FORMAT_U" is running, don't allow "
"to run more than one copy of DapServer, exiting...", pid ); "to run more than one copy of DapServer, exiting...", (uint64_t)pid );
exit( -2 ); exit( -2 );
} }
} }
......
...@@ -27,11 +27,11 @@ ...@@ -27,11 +27,11 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "dap_chain_node_cli.h"
//#include "dap_client.h" //#include "dap_client.h"
#include "dap_common.h" #include "dap_common.h"
#include "dap_file_utils.h" #include "dap_file_utils.h"
#include "dap_strfuncs.h" #include "dap_strfuncs.h"
#include "dap_chain_node_cli.h"
#include "dap_app_cli.h" #include "dap_app_cli.h"
#include "dap_app_cli_net.h" #include "dap_app_cli_net.h"
#include "dap_app_cli_shell.h" #include "dap_app_cli_shell.h"
......
...@@ -99,14 +99,16 @@ ...@@ -99,14 +99,16 @@
#endif #endif
#undef log_it #undef log_it
#ifdef DAP_OS_WINDOWS
#define log_it(_log_level, string, ...) __mingw_printf(string, ##__VA_ARGS__)
#else
#define log_it(_log_level, string, ...) printf(string, ##__VA_ARGS__) #define log_it(_log_level, string, ...) printf(string, ##__VA_ARGS__)
#endif
static int s_init( int argc, const char * argv[] ); static int s_init( int argc, const char * argv[] );
static void s_help( ); static void s_help( );
static char s_system_ca_dir[MAX_PATH]; static char s_system_ca_dir[MAX_PATH];
static char * s_config_dir = NULL;
static char * s_log_file_path= NULL;
#ifdef __ANDROID__ #ifdef __ANDROID__
int cellframe_node_tool_Main(int argc, const char **argv) int cellframe_node_tool_Main(int argc, const char **argv)
...@@ -185,7 +187,7 @@ int main(int argc, const char **argv) ...@@ -185,7 +187,7 @@ int main(int argc, const char **argv)
if ( l_data_file ) {} if ( l_data_file ) {}
} }
else { else {
log_it( L_ERROR, "Cert index %d can't be found in wallet with %lu certs inside" log_it( L_ERROR, "Cert index %d can't be found in wallet with %zu certs inside"
,l_cert_index,l_wallet_certs_number ); ,l_cert_index,l_wallet_certs_number );
s_help(); s_help();
exit( -3002 ); exit( -3002 );
...@@ -376,6 +378,8 @@ int main(int argc, const char **argv) ...@@ -376,6 +378,8 @@ int main(int argc, const char **argv)
*/ */
static int s_init( int argc, const char **argv ) static int s_init( int argc, const char **argv )
{ {
UNUSED(argc);
UNUSED(argv);
dap_set_appname("cellframe-node"); dap_set_appname("cellframe-node");
#ifdef _WIN32 #ifdef _WIN32
g_sys_dir_path = dap_strdup_printf("%s/%s", regGetUsrPath(), dap_get_appname()); g_sys_dir_path = dap_strdup_printf("%s/%s", regGetUsrPath(), dap_get_appname());
......
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