nntpcache 1.0: bugs+patches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

some minor complaints about nntpcache-1.0:
- mmalloc-files compile with warnings (patch included)

- mmap-tests.c compiles with warnings  (patch included)

- bregex.c compiles with warnings (no patch)
   bregex.c: In function `por':
   bregex.c:889: warning: `pvold' might be used uninitialized in this function
   bregex.c:889: warning: `rvold' might be used uninitialized in this function
   bregex.c: In function `bregexec':
   bregex.c:1570: warning: value computed is not used

- a test in list.c makes ~6000 newsgroups of my provider unshown to the
  clients. I have commented out the offending lines (hi is zero for missing
  newsgroups), someone should check for the correct behaviour.
  I get the idea behind this code, but I would prefer to let the user see all
  newsgroups, even if they are dead. This should probably be an option in the
  config-file?

- it seems that the very first network socket opened to the parent never gets
  closed. After some time the parent (inn1.4u4 on sol2.5.1) times out the
  socket. (no patch)

My setup:
Linux 2.0.23
libc 5.3.12
gcc 2.7.2

Otherwise nntpcache is running fine here, the money is on it's way.

here is the patch:
----------- cut here --------------
diff -r -u nntpcache-1.0-org/list.c nntpcache-1.0/list.c
--- nntpcache-1.0-org/list.c    Sat Oct  5 11:18:31 1996
+++ nntpcache-1.0/list.c        Fri Oct 25 17:40:49 1996
@@ -461,8 +461,10 @@
                        if (!n->moderation)
                                break;
                        hi = MAX(n->hi, n->hi_server);
+#if 0
                        if (hi<1)
                                break;
+#endif
                        if (n->lo>0)
                                lo = n->lo;
                        else
diff -r -u nntpcache-1.0-org/mmalloc/mmalloc.h nntpcache-1.0/mmalloc/mmalloc.h
--- nntpcache-1.0-org/mmalloc/mmalloc.h Tue Sep  3 17:07:38 1996
+++ nntpcache-1.0/mmalloc/mmalloc.h     Fri Oct 25 16:27:14 1996
@@ -9,6 +9,10 @@
 #  include <stddef.h>
 #endif
 
+#ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+#endif
+
 #include "../mmap.h"
 
 #include "mm_ansidecl.h"
diff -r -u nntpcache-1.0-org/mmalloc/mmap-sup.c
nntpcache-1.0/mmalloc/mmap-sup.c
--- nntpcache-1.0-org/mmalloc/mmap-sup.c        Tue Sep  3 20:06:39 1996
+++ nntpcache-1.0/mmalloc/mmap-sup.c    Fri Oct 25 16:27:14 1996
@@ -38,7 +38,7 @@
    it out. */
 
 static size_t pagesize;
-extern int getpagesize PARAMS ((void));
+extern size_t getpagesize PARAMS ((void));
 
 #define PAGE_ALIGN(addr) (caddr_t) (((long)(addr) + pagesize - 1) & \
                                    ~(pagesize - 1))
diff -r -u nntpcache-1.0-org/mmalloc/mvalloc.c nntpcache-1.0/mmalloc/mvalloc.c
--- nntpcache-1.0-org/mmalloc/mvalloc.c Sat Jul 20 23:42:33 1996
+++ nntpcache-1.0/mmalloc/mvalloc.c     Fri Oct 25 16:27:14 1996
@@ -24,7 +24,7 @@
    it out. */
 
 static size_t pagesize;
-extern int getpagesize PARAMS ((void));
+extern size_t getpagesize PARAMS ((void));
 
 PTR
 mvalloc (md, size)
diff -r -u nntpcache-1.0-org/mmap_tests.c nntpcache-1.0/mmap_tests.c
--- nntpcache-1.0-org/mmap_tests.c      Tue Sep  3 11:59:25 1996
+++ nntpcache-1.0/mmap_tests.c  Fri Oct 25 16:27:14 1996
@@ -221,6 +221,7 @@
 #include <unistd.h>
 #include <signal.h>
 #include <setjmp.h>
+#include <wait.h>
 
 #define MM_SIZE (100*1024)
 #define TEST_FILE "mmap_test.tmp"
----------- cut here --------------

Bye,

diff -r -u nntpcache-1.0-org/list.c nntpcache-1.0/list.c
--- nntpcache-1.0-org/list.c	Sat Oct  5 11:18:31 1996
+++ nntpcache-1.0/list.c	Fri Oct 25 17:40:49 1996
@@ -461,8 +461,10 @@
 			if (!n->moderation)
 				break;
 			hi = MAX(n->hi, n->hi_server);
+#if 0
 			if (hi<1)
 				break;
+#endif
 			if (n->lo>0)
 				lo = n->lo;
 			else
diff -r -u nntpcache-1.0-org/mmalloc/mmalloc.h nntpcache-1.0/mmalloc/mmalloc.h
--- nntpcache-1.0-org/mmalloc/mmalloc.h	Tue Sep  3 17:07:38 1996
+++ nntpcache-1.0/mmalloc/mmalloc.h	Fri Oct 25 16:27:14 1996
@@ -9,6 +9,10 @@
 #  include <stddef.h>
 #endif
 
+#ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+#endif
+
 #include "../mmap.h"
 
 #include "mm_ansidecl.h"
diff -r -u nntpcache-1.0-org/mmalloc/mmap-sup.c nntpcache-1.0/mmalloc/mmap-sup.c
--- nntpcache-1.0-org/mmalloc/mmap-sup.c	Tue Sep  3 20:06:39 1996
+++ nntpcache-1.0/mmalloc/mmap-sup.c	Fri Oct 25 16:27:14 1996
@@ -38,7 +38,7 @@
    it out. */
 
 static size_t pagesize;
-extern int getpagesize PARAMS ((void));
+extern size_t getpagesize PARAMS ((void));
 
 #define PAGE_ALIGN(addr) (caddr_t) (((long)(addr) + pagesize - 1) & \
 				    ~(pagesize - 1))
diff -r -u nntpcache-1.0-org/mmalloc/mvalloc.c nntpcache-1.0/mmalloc/mvalloc.c
--- nntpcache-1.0-org/mmalloc/mvalloc.c	Sat Jul 20 23:42:33 1996
+++ nntpcache-1.0/mmalloc/mvalloc.c	Fri Oct 25 16:27:14 1996
@@ -24,7 +24,7 @@
    it out. */
 
 static size_t pagesize;
-extern int getpagesize PARAMS ((void));
+extern size_t getpagesize PARAMS ((void));
 
 PTR
 mvalloc (md, size)
diff -r -u nntpcache-1.0-org/mmap_tests.c nntpcache-1.0/mmap_tests.c
--- nntpcache-1.0-org/mmap_tests.c	Tue Sep  3 11:59:25 1996
+++ nntpcache-1.0/mmap_tests.c	Fri Oct 25 16:27:14 1996
@@ -221,6 +221,7 @@
 #include <unistd.h>
 #include <signal.h>
 #include <setjmp.h>
+#include <wait.h>
 
 #define MM_SIZE (100*1024)
 #define TEST_FILE "mmap_test.tmp"


Franz Sirl

!!!>> Come and visit Bavaria!!
!!!>> Enjoy the alps, original bavarian beergardens and much more!

-------------------------------------------------------------------------
Lauterbach Trace32 emulators/debuggers
-------------------------------------------------------------------------
phone  +49 8104 8943-60                mail  Lauterbach Datentechnik GmbH
fax    +49 8104 8943-49                      c/o Franz Sirl
URLs   <mailto:franz.sirl@lauterbach.com>    Fichtenstr. 27
       <http://www.lauterbach.com>           D-85649 Hofolding
       <ftp://ftp.lauterbach.com>            Germany
-------------------------------------------------------------------------

[Index of Archives]     [Yosemite]     [Yosemite Campsites]     [Bugtraq]     [Linux]     [Trn]

Powered by Linux