Thread View: news.software.nntp
1 messages
1 total messages
Started by News Administration
Sat, 17 Mar 1990 16:01
NNTP 1.5.8 space checking is broken.
Author: News Administration
Date: Sat, 17 Mar 1990 16:01
Date: Sat, 17 Mar 1990 16:01
61 lines
2528 bytes
2528 bytes
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/
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads