Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
k-sdk
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陈伟灿
k-sdk
Commits
999cbb39
Commit
999cbb39
authored
Aug 28, 2020
by
黄振令
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【修改内容】对于使用nanomsg发送方式修改为长等待,保证数据收到
parent
0772aad7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
common/api/com_api.c
common/api/com_api.c
+14
-4
platform/zigbee/app/builder/Z3GatewayHost/libapi_com.so
platform/zigbee/app/builder/Z3GatewayHost/libapi_com.so
+0
-0
No files found.
common/api/com_api.c
View file @
999cbb39
...
...
@@ -97,13 +97,23 @@ static void watcher_cb (struct ev_loop *loop ,struct ev_io *w, int revents)
}
//for test ipc connect or not
if
(
loop_ctrl
->
isconnect
==
0
){
/*
if (loop_ctrl->isconnect == 0 ){
loop_ctrl->isconnect =1;
if (strncmp(validDat,MAGIC, strlen(MAGIC)) == 0){
kk_ipc_send
(
loop_ctrl
->
type
,
validDat
,
bytes
);
kk_ipc_send
_ex(loop_ctrl->type, validDat, bytes, chlMark
);
nn_freemsg(dat);
return;
}
}*/
if
(
strncmp
(
validDat
,
MAGIC
,
strlen
(
MAGIC
))
==
0
){
if
(
loop_ctrl
->
isconnect
==
0
){
kk_ipc_send_ex
(
loop_ctrl
->
type
,
validDat
,
bytes
,
chlMark
);
loop_ctrl
->
isconnect
=
1
;
}
nn_freemsg
(
dat
);
return
;
}
else
if
(
IPC_MID2PLAT
==
loop_ctrl
->
type
){
//
loop_ctrl
->
isconnect
=
0
;
}
if
(
loop_ctrl
->
cb
!=
NULL
){
...
...
@@ -400,9 +410,9 @@ int kk_ipc_send_ex(ipc_type type, void* data, int len, char* chalMark)
memcpy
(
buf
+
filterlen
,
data
,
len
);
if
(
type
==
IPC_MID2PLAT
){
nn_send
(
Mloop_ctrl
.
ab
.
n
,
&
buf
,
NN_MSG
,
NN_DONTWAIT
);
nn_send
(
Mloop_ctrl
.
ab
.
n
,
&
buf
,
NN_MSG
,
0
);
//NN_DONTWAIT
}
else
{
nn_send
(
Bloop_ctrl
.
ba
.
n
,
&
buf
,
NN_MSG
,
NN_DONTWAIT
);
nn_send
(
Bloop_ctrl
.
ba
.
n
,
&
buf
,
NN_MSG
,
0
);
}
}
...
...
platform/zigbee/app/builder/Z3GatewayHost/libapi_com.so
View file @
999cbb39
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment