Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cellframe-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
18
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
cellframe
cellframe-sdk
Commits
c28c9843
Commit
c28c9843
authored
3 years ago
by
Roman Khlopkov
🔜
Browse files
Options
Downloads
Patches
Plain Diff
[*] DAP_DUP redefine & usage
parent
e68e0970
No related branches found
Branches containing commit
No related tags found
1 merge request
!337
hotfix-4898
Pipeline
#8248
passed with stage
Stage: analyze
in 5 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dap-sdk/core/include/dap_common.h
+4
-4
4 additions, 4 deletions
dap-sdk/core/include/dap_common.h
modules/net/dap_chain_node_client.c
+4
-4
4 additions, 4 deletions
modules/net/dap_chain_node_client.c
with
8 additions
and
8 deletions
dap-sdk/core/include/dap_common.h
+
4
−
4
View file @
c28c9843
...
...
@@ -122,8 +122,8 @@ typedef uint8_t byte_t;
#define DAP_NEW_Z_SIZE(a, b) DAP_CAST_REINT(a, rpcalloc(1,b))
#define DAP_REALLOC(a, b) rprealloc(a,b)
#define DAP_DELETE(a) rpfree(a)
#define DAP_DUP(a)
( __typeof(a) ret =
memcpy(
ret,a,
sizeof(*
a))
)
#define DAP_DUP_SIZE(a,
b) ( __typeof(a) ret = memcpy(ret,a,b)
)
#define DAP_DUP(a
, b
) memcpy(
a, b,
sizeof(*
b)
)
#define DAP_DUP_SIZE(a,
b, s) memcpy(a, b, s
)
#else
#define DAP_MALLOC(a) malloc(a)
#define DAP_FREE(a) free(a)
...
...
@@ -139,8 +139,8 @@ typedef uint8_t byte_t;
#define DAP_NEW_Z_SIZE(a, b) DAP_CAST_REINT(a, calloc(1,b))
#define DAP_REALLOC(a, b) realloc(a,b)
#define DAP_DELETE(a) free(a)
#define DAP_DUP(a)
( __typeof(a) ret =
memcpy(
ret,a,
sizeof(*
a))
)
#define DAP_DUP_SIZE(a,
b) ( __typeof(a) memcpy(ret,a,b)
)
#define DAP_DUP(a
, b
) memcpy(
a, b,
sizeof(*
b)
)
#define DAP_DUP_SIZE(a,
b, s) memcpy(a, b, s
)
#endif
#define DAP_DEL_Z(a) if(a) { DAP_DELETE(a); a=NULL;}
...
...
This diff is collapsed.
Click to expand it.
modules/net/dap_chain_node_client.c
+
4
−
4
View file @
c28c9843
...
...
@@ -181,8 +181,6 @@ static void s_stage_status_error_callback(dap_client_t *a_client, void *a_arg)
static
void
s_node_client_connected_synchro_start_callback
(
dap_worker_t
*
a_worker
,
void
*
a_arg
)
{
UNUSED
(
a_worker
);
dap_events_socket_uuid_t
*
l_uuid
=
DAP_NEW
(
dap_events_socket_uuid_t
);
memcpy
(
l_uuid
,
a_arg
,
sizeof
(
dap_events_socket_uuid_t
));
if
(
s_timer_update_states_callback
(
a_arg
))
DAP_DELETE
(
l_uuid
);
}
...
...
@@ -281,9 +279,11 @@ static void s_stage_connected_callback(dap_client_t *a_client, void *a_arg)
l_node_client
->
stream_worker
=
l_stream
->
stream_worker
;
if
(
l_node_client
->
keep_connection
)
{
dap_events_socket_uuid_t
*
l_uuid
=
DAP_NEW
(
dap_events_socket_uuid_t
);
memcpy
(
l_uuid
,
&
l_node_client
->
uuid
,
sizeof
(
dap_events_socket_uuid_t
)
);
DAP_DUP
(
l_uuid
,
&
l_node_client
->
uuid
);
dap_worker_exec_callback_on
(
l_stream
->
esocket
->
worker
,
s_node_client_connected_synchro_start_callback
,
l_uuid
);
dap_timerfd_start_on_worker
(
l_stream
->
esocket
->
worker
,
s_timer_update_states
*
1000
,
s_timer_update_states_callback
,
l_uuid
);
dap_events_socket_uuid_t
*
l_uuid_timer
=
DAP_NEW
(
dap_events_socket_uuid_t
);
DAP_DUP
(
l_uuid_timer
,
&
l_node_client
->
uuid
);
dap_timerfd_start_on_worker
(
l_stream
->
esocket
->
worker
,
s_timer_update_states
*
1000
,
s_timer_update_states_callback
,
l_uuid_timer
);
}
}
#ifndef _WIN32
...
...
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