Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
celllframe-node
Manage
Activity
Members
Labels
Plan
Issues
5
Issue boards
Milestones
Code
Merge requests
14
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cellframe
celllframe-node
Merge requests
!73
Various Windows-specific fixes
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Various Windows-specific fixes
support-2719
into
master
Overview
0
Commits
2
Pipelines
0
Changes
7
Merged
Constantin P.
requested to merge
support-2719
into
master
5 years ago
Overview
0
Commits
2
Pipelines
0
Changes
7
Expand
👍
0
👎
0
Merge request reports
Compare
master
version 1
183dd4cd
5 years ago
master (base)
and
latest version
latest version
ac7dd685
2 commits,
5 years ago
version 1
183dd4cd
1 commit,
5 years ago
7 files
+
59
−
79
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
7
Search (e.g. *.vue) (Ctrl+P)
sources/main.c
+
25
−
24
Options
@@ -125,9 +125,7 @@
void
parse_args
(
int
argc
,
const
char
**
argv
);
void
exit_if_server_already_running
(
void
);
static
char
*
s_config_dir
=
NULL
;
static
char
*
s_pid_file_path
=
NULL
;
static
char
*
s_log_file_path
=
NULL
;
static
void
s_auth_callback
(
enc_http_delegate_t
*
a_delegate
,
void
*
a_arg
);
#ifdef __ANDROID__
@@ -146,36 +144,39 @@ int main( int argc, const char **argv )
S_SetExceptionFilter
(
);
#endif
{
#ifdef _WIN32
s
_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
());
#elif DAP_OS_MAC
s
_sys_dir_path
=
dap_strdup_printf
(
"/Applications/%s.app/Contents/Resources"
,
dap_get_appname
());
g
_sys_dir_path
=
dap_strdup_printf
(
"/Applications/%s.app/Contents/Resources"
,
dap_get_appname
());
#elif DAP_OS_ANDROID
s
_sys_dir_path
=
dap_strdup_printf
(
"/storage/emulated/0/opt/%s"
,
dap_get_appname
());
g
_sys_dir_path
=
dap_strdup_printf
(
"/storage/emulated/0/opt/%s"
,
dap_get_appname
());
#elif DAP_OS_UNIX
g_sys_dir_path
=
dap_strdup_printf
(
"/opt/%s"
,
dap_get_appname
());
g_sys_dir_path
=
dap_strdup_printf
(
"/opt/%s"
,
dap_get_appname
());
#endif
g_sys_dir_path_len
=
strlen
(
g_sys_dir_path
);
s_config_dir
=
dap_strdup_printf
(
"%s/etc"
,
g_sys_dir_path
);
s_log_file_path
=
dap_strdup_printf
(
"%s/var/log/%s.log"
,
g_sys_dir_path
,
dap_get_appname
());
char
*
l_log_dir_path
=
dap_strdup_printf
(
"%s/var/log"
,
g_sys_dir_path
);
dap_mkdir_with_parents
(
l_log_dir_path
);
DAP_DELETE
(
l_log_dir_path
);
if
(
dap_common_init
(
dap_get_appname
(),
s_log_file_path
)
!=
0
)
{
printf
(
"Fatal Error: Can't init common functions module"
);
{
char
l_log_path
[
MAX_PATH
]
=
{
'\0'
};
int
l_pos
=
dap_sprintf
(
l_log_path
,
"%s/var/log"
,
g_sys_dir_path
);
dap_mkdir_with_parents
(
l_log_path
);
dap_sprintf
(
l_log_path
+
l_pos
,
"/%s.log"
,
dap_get_appname
());
if
(
dap_common_init
(
dap_get_appname
(),
l_log_path
)
!=
0
)
{
printf
(
"Fatal Error: Can't init common functions module"
);
return
-
2
;
}
dap_config_init
(
s_config_dir
);
if
(
(
g_config
=
dap_config_open
(
dap_get_appname
()))
==
NULL
)
{
log_it
(
L_CRITICAL
,
"Can't init general configurations"
);
return
-
1
;
}
s_pid_file_path
=
dap_config_get_item_str_default
(
g_config
,
"resources"
,
"pid_path"
,
"/tmp"
)
;
}
{
char
l_config_dir
[
MAX_PATH
]
=
{
'\0'
};
dap_sprintf
(
l_config_dir
,
"%s/etc"
,
g_sys_dir_path
);
dap_config_init
(
l_config_dir
);
}
if
((
g_config
=
dap_config_open
(
dap_get_appname
()))
==
NULL
)
{
log_it
(
L_CRITICAL
,
"Can't init general configurations"
);
return
-
1
;
}
s_pid_file_path
=
dap_config_get_item_str_default
(
g_config
,
"resources"
,
"pid_path"
,
"/tmp"
)
;
log_it
(
L_DEBUG
,
"Parsing command line args"
);
parse_args
(
argc
,
argv
);
#ifdef _WIN32
Loading