Test changes in net_com.c for bad connects...

This commit is contained in:
Jeff Teunissen 2000-01-01 16:35:48 +00:00
parent 4abffbc7bb
commit c2827bb3d7

View file

@ -32,8 +32,12 @@ unsigned Com_BlockChecksum (void *buffer, int length)
{
int digest[4];
unsigned val;
struct mdfour md;
mdfour ( (unsigned char *) digest, (unsigned char *) buffer, length );
mdfour_begin (&md);
mdfour_update (&md, (unsigned char *) buffer, length);
mdfour_result (&md, (unsigned char *) digest);
// mdfour ( (unsigned char *) digest, (unsigned char *) buffer, length );
val = digest[0] ^ digest[1] ^ digest[2] ^ digest[3];
@ -42,5 +46,10 @@ unsigned Com_BlockChecksum (void *buffer, int length)
void Com_BlockFullChecksum (void *buffer, int len, unsigned char *outbuf)
{
mdfour ( outbuf, (unsigned char *) buffer, len );
struct mdfour md;
mdfour_begin (&md);
mdfour_update (&md, (unsigned char *) buffer, len);
mdfour_final (&md, outbuf);
// mdfour ( outbuf, (unsigned char *) buffer, len );
}