Commit 9e1a6cb6 authored by chenhaowen's avatar chenhaowen

fix confict

parents 7fc47cbd 40f1b165
...@@ -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,13 +233,10 @@ HEART_BEAT_START: ...@@ -232,13 +233,10 @@ 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;
int i; <<<<<<< HEAD
for (i=0; i<3; i++) =======
{ short_wait_sleep(3);
if (drcom_config.exit) >>>>>>> master
return 0;
sleep(1);
}
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);
...@@ -315,12 +313,10 @@ HEART_BEAT_START: ...@@ -315,12 +313,10 @@ HEART_BEAT_START:
kp2_cnt++; kp2_cnt++;
for (i=0; i<17; i++) <<<<<<< HEAD
{ =======
if (drcom_config.exit) short_wait_sleep(17);
return 0; >>>>>>> master
sleep(1);
}
} }
#ifdef WIN32 #ifdef WIN32
closesocket(client_sockfd); closesocket(client_sockfd);
...@@ -595,3 +591,7 @@ void gen_ka2_checksum(uint8_t *data, int len, uint8_t *checksum) ...@@ -595,3 +591,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);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment