news@medusa.informatik.uni-erlangen.de (News Administration) (03/18/90)
The 1.5.8 patch for nntp was a real hit. The dfre code looks very
nice now (really). That code verifies that the spool partition is not too full
to accept more articles. What a pity that if/then/else dependenices in C
are not tabulation sensitive.
(in english: THE CODE TO CHECK FOR FREE SPACE IN 1.5.8 IS BROKEN)
Below is my patch to make this code work again.
------- ihave.c -------
*** /tmp/da7631 Sat Mar 17 16:52:57 1990
--- ihave.c Sat Mar 17 14:22:26 1990
***************
*** 74,79 ****
--- 74,81 ----
if (retcode <= 0){
cp = index(errbuf,':');
+ if (cp == (char *) NULL)
+ cp = "NULL";
while (*cp == ' ') cp++;
if (strcasecmp(cp,"inbound",7))
printf("%d %s\r\n", ERR_XFERFAIL, errbuf);
------- misc.c -------
*** /tmp/da7634 Sat Mar 17 16:52:59 1990
--- misc.c Sat Mar 17 16:52:39 1990
***************
*** 788,798 ****
if (filfree(fsys) < MINFILES )
return( DFREE_INODES );
# endif
! if (blkavail(fsys) == -1)
! /* the bavail field doesn't apply to this file system */
if(blkfree(fsys) < free_space)
return( DFREE_BLOCKS );
! else if (blkavail(fsys) < free_space )
return( DFREE_BLOCKS );
return( DFREE_OK );
}
--- 788,801 ----
if (filfree(fsys) < MINFILES )
return( DFREE_INODES );
# endif
! if (blkavail(fsys) == -1) {
! #if !defined(sun)
! /* on suns this is -1 if the partition is _very_ full. */
if(blkfree(fsys) < free_space)
+ #endif
return( DFREE_BLOCKS );
! }
! else if (blkavail(fsys) < free_space )
return( DFREE_BLOCKS );
return( DFREE_OK );
}
--
Toerless Eckert Internet: eckert@informatik.uni-erlangen.de
X.400: /C=de/A=dbp/P=uni-erlangen/OU=informatik/S=eckert/