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
42c73a98
Commit
42c73a98
authored
Aug 31, 2020
by
黄振令
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【修改内容】tcp 发送增加保护
【提交人】huang.zhenling
parent
7d285570
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
common/api/tcp_channel.c
common/api/tcp_channel.c
+6
-0
platform/zigbee/app/builder/Z3GatewayHost/libapi_com.so
platform/zigbee/app/builder/Z3GatewayHost/libapi_com.so
+0
-0
No files found.
common/api/tcp_channel.c
View file @
42c73a98
...
...
@@ -645,14 +645,20 @@ int kk_tcp_client_send(char* data, int len){
sleep
(
1
);
cnt
++
;
}
if
(
g_client_ctrl
.
sd
<
0
){
printf
(
"[%s] The tcp socket created fialid !!!!
\n
"
,
__FUNCTION__
);
return
-
1
;
}
_MutexLock
(
g_client_ctrl
.
mutex
);
ret
=
write
(
g_client_ctrl
.
sd
,
data
,
len
);
_MutexUnlock
(
g_client_ctrl
.
mutex
);
if
(
ret
<
0
){
printf
(
"[%s] write failed ret=%d, reconnect !!!!
\n
"
,
__FUNCTION__
,
ret
);
g_client_ctrl
.
isConnect
=
0
;
ret
=
-
1
;
}
}
return
ret
;
}
int
kk_tcp_client_init
(
char
ip
[
MAX_IP_LEN
],
int
port
,
ipc_cb
cb
)
{
...
...
platform/zigbee/app/builder/Z3GatewayHost/libapi_com.so
View file @
42c73a98
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