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
e16ac3e1
Commit
e16ac3e1
authored
Aug 24, 2020
by
黄振令
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【修改内容】去掉无用code
【提交人】huang.zhenling
parent
b6f4de61
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
36 deletions
+0
-36
midware/midware/midware.c
midware/midware/midware.c
+0
-36
No files found.
midware/midware/midware.c
View file @
e16ac3e1
...
@@ -282,18 +282,6 @@ void *udp_dispatch_yield(void *args){
...
@@ -282,18 +282,6 @@ void *udp_dispatch_yield(void *args){
{
{
ERROR_PRINT
(
"socket error
\n
"
);
ERROR_PRINT
(
"socket error
\n
"
);
}
}
#if 0
const int opt = 1;
//设置该套接字为广播类型,
int nb = 0;
nb = setsockopt(sock, SOL_SOCKET, SO_BROADCAST| SO_REUSEADDR, (char *)&opt, sizeof(opt));
if(nb == -1)
{
DEBUG("set socket error...\n");
}
#endif
if
(
bind
(
sock
,(
struct
sockaddr
*
)
&
(
addrto
),
sizeof
(
struct
sockaddr_in
))
==
-
1
)
if
(
bind
(
sock
,(
struct
sockaddr
*
)
&
(
addrto
),
sizeof
(
struct
sockaddr_in
))
==
-
1
)
{
{
...
@@ -412,30 +400,6 @@ void *udp_dispatch_yield(void *args){
...
@@ -412,30 +400,6 @@ void *udp_dispatch_yield(void *args){
}
}
/*if(strcmp(szDec,"search_kk_gw|null") == 0){
HAL_Get_IP(host_ip,"ens33");
HAL_Get_mac(mac);
sprintf(szOut,"search_kk_gw_ack|mac=%s;ip=%s",mac,host_ip);
DEBUG_PRINT("szOut:%s\n",szOut);
DEBUG_PRINT("udp client ip:%s ,port is :%d htons(UDP_LAN_PORT)=%d \n",inet_ntoa(from.sin_addr),from.sin_port, htons(UDP_LAN_PORT));
//sendto(sock, szOut, strlen(szOut), 0, (struct sockaddr*)&from,len);
addrto_host.sin_addr.s_addr = inet_addr(inet_ntoa(from.sin_addr));
//addrto_host.sin_port = htons(UDP_LAN_PORT_HOST);
addrto_host.sin_port = from.sin_port;
if(strcmp(host_ip,inet_ntoa(from.sin_addr)) == 0)
{
sendto(sock_host, szOut, strlen(szOut), 0, (struct sockaddr*)&addrto_host,sizeof(addrto_host));
}
else
{
DEBUG_PRINT("udp client is not local ip , refused send ack to it\n");
}
}else{
DEBUG_PRINT("strmp error\n");
}*/
}
}
usleep
(
100000
);
usleep
(
100000
);
...
...
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