packetsize wasn't calculated right into the resend cache.

origin
stpohle 21 years ago
parent e4c5b3fbc1
commit cdbcd2c06e

@ -1,4 +1,4 @@
/* $Id: pkgcache.c,v 1.8 2004/05/25 22:22:30 stpohle Exp $
/* $Id: pkgcache.c,v 1.9 2005/03/28 03:04:35 stpohle Exp $
* Resendcache work, We need this to resend lost packets over the network.
* we will keep every packet with the PKGF_ackreq flag as long as we haven't
* got any answer from the destination host. And resend the packet after a givin
@ -28,7 +28,10 @@ rscache_add (_net_addr * addr, struct pkg *packet)
{
int newlen;
if (resend_cache.fill + sizeof (struct _rscache_entry) > PKG_RESENDCACHE_SIZE)
/* maybe we forgot to check here something? i don't know but it seems
* that i forgot to calculate the packetsize into this.
* (i'll add the packet len to this calculation) */
if (resend_cache.fill + sizeof (struct _rscache_entry) + packet->h.len > PKG_RESENDCACHE_SIZE)
return -1;
rscache_setpointer (resend_cache.fill);

Loading…
Cancel
Save