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

Re: [leafnode-list] 2.0b8_ma3 leafnode very slow

Joerg Mosthaf <Joerg_Mosthaf@xxxxxx> writes:

> Doesn't compile. I get:
> compiling nntpd.c
> nntpd.c: In function `main':
> nntpd.c:2005: parse error before `struct'

Thanks for testing.

Sorry, I spoiled it, the last three lines belong a few lines below,
after #endif. Because I was in a hurry, I just test-compiled my version,
but not the version that I described.

I now have a patch which compiles:

In case BeroList eats it, find it here:

But here it is as well, change into the leafnode directory, and apply
with (replace /path/where/you/saved with the actual path):

patch -p1 </path/where/you/saved/leafnode-2.0b8_ma4-buffer.patch

Then recompile and install.


--cut here--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----

diff -c leafnode-2.0b8_ma4/nntpd.c leafnode-2.0b8_ma4.1/nntpd.c
*** leafnode-2.0b8_ma4/nntpd.c	Mon Jul  2 02:53:07 2001
--- leafnode-2.0b8_ma4.1/nntpd.c	Thu Jul  5 00:15:33 2001
*** 1996,2001 ****
--- 1996,2003 ----
      char peername[256];
      struct hostent *he;
      FILE *se;
+     const long bufsize = BLOCKSIZE;
+     char *buf = critmalloc(bufsize, "main_loop");
  #ifdef HAVE_IPV6
      struct sockaddr_in6 sa;
*** 2004,2009 ****
--- 2006,2016 ----
      struct sockaddr_in sa;
      struct sockaddr_in peer;
+     /* set buffer */
+     fflush(stdout);
+     setvbuf(stdout, buf, _IOFBF, bufsize);
      if (((err = snprintf(conffile, sizeof(conffile), "%s/config", libdir)) < 0)
  	|| (err >= (int)sizeof(conffile))) 

leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list