just commit

This commit is contained in:
wangyu- 2017-10-13 11:32:05 -05:00
parent 11730a8cbf
commit c12a1326fc
3 changed files with 13 additions and 7 deletions

View File

@ -442,9 +442,9 @@ int client_event_loop()
mylog(log_warn,"huge packet,data len=%d (>%d).strongly suggested to set a smaller mtu at upper level,to get rid of this warn\n ",data_len,mtu_warn); mylog(log_warn,"huge packet,data len=%d (>%d).strongly suggested to set a smaller mtu at upper level,to get rid of this warn\n ",data_len,mtu_warn);
} }
if(cook_rm_crc32(data,data_len)!=0) if(de_cook(data,data_len)!=0)
{ {
mylog(log_debug,"cook_rm_crc32 check error"); mylog(log_debug,"de_cook error");
continue; continue;
} }
@ -602,9 +602,9 @@ int server_event_loop()
} }
if(cook_rm_crc32(data,data_len)!=0) if(de_cook(data,data_len)!=0)
{ {
mylog(log_debug,"cook_rm_crc32 check error"); mylog(log_debug,"de_cook error");
continue; continue;
} }

View File

@ -301,7 +301,7 @@ int put_crc32(char * s,int &len)
return 0; return 0;
} }
int cook_rm_crc32(char * s,int &len) int de_cook(char * s,int &len)
{ {
if(!disable_xor)decrypt_0(s,len,key_string); if(!disable_xor)decrypt_0(s,len,key_string);
if(!disable_obscure) if(!disable_obscure)
@ -313,7 +313,13 @@ int cook_rm_crc32(char * s,int &len)
return ret; return ret;
} }
} }
return rm_crc32(s,len); int ret=rm_crc32(s,len);
if(ret!=0)
{
mylog(log_debug,"rm_crc32 fail\n");
return ret;
}
return 0;
} }
int rm_crc32(char * s,int &len) int rm_crc32(char * s,int &len)
{ {

View File

@ -41,5 +41,5 @@ int put_conv(u32_t conv,const char * input,int len_in,char *&output,int &len_out
int get_conv(u32_t &conv,const char *input,int len_in,char *&output,int &len_out ); int get_conv(u32_t &conv,const char *input,int len_in,char *&output,int &len_out );
int put_crc32(char * s,int &len); int put_crc32(char * s,int &len);
int rm_crc32(char * s,int &len); int rm_crc32(char * s,int &len);
int cook_rm_crc32(char * s,int &len); int de_cook(char * s,int &len);
#endif /* PACKET_H_ */ #endif /* PACKET_H_ */