Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
G
gdut-drcom
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
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
nanahira
gdut-drcom
Commits
79a72555
Commit
79a72555
authored
Dec 07, 2016
by
chenhaowen01
Committed by
GitHub
Dec 07, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7 from jiangming1399/master
修正退出时间过长的问题
parents
52ab4ff7
c2725cca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
src/auth.c
src/auth.c
+7
-2
No files found.
src/auth.c
View file @
79a72555
...
@@ -68,6 +68,7 @@ static void gen_ka2_checksum(uint8_t *data, int len, uint8_t *checksum);
...
@@ -68,6 +68,7 @@ static void gen_ka2_checksum(uint8_t *data, int len, uint8_t *checksum);
static
uint32_t
drcomCRC32
(
uint8_t
*
data
,
int
len
);
static
uint32_t
drcomCRC32
(
uint8_t
*
data
,
int
len
);
static
void
print_as_hex
(
uint8_t
*
buf
,
int
len
);
static
void
print_as_hex
(
uint8_t
*
buf
,
int
len
);
static
void
short_wait_sleep
(
int
second
);
/****local functions****/
/****local functions****/
...
@@ -232,7 +233,7 @@ HEART_BEAT_START:
...
@@ -232,7 +233,7 @@ HEART_BEAT_START:
rand_num
[
0
]
=
rand_tmp
/
0x100
;
rand_num
[
0
]
=
rand_tmp
/
0x100
;
rand_num
[
1
]
=
rand_tmp
%
0x100
;
rand_num
[
1
]
=
rand_tmp
%
0x100
;
sleep
(
3
);
s
hort_wait_s
leep
(
3
);
while
(
1
)
while
(
1
)
{
{
length
=
make_keep_alive2_pkt1
(
pkt_data
,
kp2_cnt
,
ka2_flag
,
rand_num
,
ka2_key
);
length
=
make_keep_alive2_pkt1
(
pkt_data
,
kp2_cnt
,
ka2_flag
,
rand_num
,
ka2_key
);
...
@@ -309,7 +310,7 @@ HEART_BEAT_START:
...
@@ -309,7 +310,7 @@ HEART_BEAT_START:
kp2_cnt
++
;
kp2_cnt
++
;
sleep
(
17
);
s
hort_wait_s
leep
(
17
);
}
}
#ifdef WIN32
#ifdef WIN32
closesocket
(
client_sockfd
);
closesocket
(
client_sockfd
);
...
@@ -583,3 +584,7 @@ void gen_ka2_checksum(uint8_t *data, int len, uint8_t *checksum)
...
@@ -583,3 +584,7 @@ void gen_ka2_checksum(uint8_t *data, int len, uint8_t *checksum)
memcpy
(
checksum
,
(
uint8_t
*
)
&
checksum_tmp
,
4
);
memcpy
(
checksum
,
(
uint8_t
*
)
&
checksum_tmp
,
4
);
}
}
static
void
short_wait_sleep
(
int
second
){
for
(
int
i
=
second
;
i
>
0
&&
!
drcom_config
.
exit
;
i
--
)
sleep
(
1
);
}
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