Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dap-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
6
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
dap
dap-sdk
Commits
8bf745b3
Commit
8bf745b3
authored
5 days ago
by
pavel.uhanov
Browse files
Options
Downloads
Patches
Plain Diff
[*] change callback call
parent
f0d0e85f
No related branches found
No related tags found
No related merge requests found
Pipeline
#52360
passed with stage
in 10 minutes and 20 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
net/server/cli_server/dap_cli_server.c
+7
-4
7 additions, 4 deletions
net/server/cli_server/dap_cli_server.c
net/server/cli_server/include/dap_cli_server.h
+1
-1
1 addition, 1 deletion
net/server/cli_server/include/dap_cli_server.h
with
8 additions
and
5 deletions
net/server/cli_server/dap_cli_server.c
+
7
−
4
View file @
8bf745b3
...
...
@@ -510,8 +510,10 @@ char *dap_cli_cmd_exec(char *a_req_str) {
}
// Call the command function
if
(
l_cmd
&&
l_argv
&&
l_cmd
->
func
)
{
if
(
s_stat_callback
)
s_stat_callback
(
l_cmd
->
id
,
true
);
dap_time_t
l_call_time
=
0
;
if
(
s_stat_callback
)
{
l_call_time
=
dap_nanotime_now
();
}
if
(
json_commands
(
cmd_name
))
{
res
=
l_cmd
->
func
(
l_argc
,
l_argv
,
(
void
*
)
&
l_json_arr_reply
);
}
else
if
(
l_cmd
->
arg_func
)
{
...
...
@@ -519,8 +521,9 @@ char *dap_cli_cmd_exec(char *a_req_str) {
}
else
{
res
=
l_cmd
->
func
(
l_argc
,
l_argv
,
(
void
*
)
&
str_reply
);
}
if
(
s_stat_callback
)
s_stat_callback
(
l_cmd
->
id
,
false
);
if
(
s_stat_callback
)
{
s_stat_callback
(
l_cmd
->
id
,
(
dap_nanotime_now
()
-
l_call_time
)
/
1000000
);
}
}
else
if
(
l_cmd
)
{
log_it
(
L_WARNING
,
"NULL arguments for input for command
\"
%s
\"
"
,
str_cmd
);
dap_json_rpc_error_add
(
l_json_arr_reply
,
-
1
,
"NULL arguments for input for command
\"
%s
\"
"
,
str_cmd
);
...
...
This diff is collapsed.
Click to expand it.
net/server/cli_server/include/dap_cli_server.h
+
1
−
1
View file @
8bf745b3
...
...
@@ -32,7 +32,7 @@
typedef
int
(
*
dap_cli_server_cmd_callback_ex_t
)(
int
argc
,
char
**
argv
,
void
*
arg_func
,
void
**
a_str_reply
);
typedef
int
(
*
dap_cli_server_cmd_callback_t
)(
int
argc
,
char
**
argv
,
void
**
a_str_reply
);
typedef
void
(
*
dap_cli_server_cmd_stat_callback_t
)(
int16_t
a_cmd_num
,
bool
a_flag
);
// use to statistic collect
typedef
void
(
*
dap_cli_server_cmd_stat_callback_t
)(
int16_t
a_cmd_num
,
int64_t
a_call_time
);
// use to statistic collect
typedef
void
(
*
dap_cli_server_override_log_cmd_callback_t
)(
const
char
*
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment