"John Mellor" <[EMAIL PROTECTED]> writes:

> Have used wwwoffle for some time now and find it incredibly useful.  This
> morning I plucked up the courage to try the search facilities with htdig
> etc.  Whichever one I try I get "Connection closed by remote server"
> and nothing in the syslog.  Cannot figure it out at all.  Can anyone
> help please? 2.8c with Opera on Slackware 9.1.

This is something that we have discussed before on this list.  There
is a bug in WWWOFFLE version 2.8c that means that the search feature
doesn't work for some users.

Previously I said:

: A workaround is to use the -l option (which is a very useful option
: anyway).
:
: A minimal patch that will fix the problem is below, a more detailed
: one has been put in for the next version.

I suppose that I should think about releasing version 2.8d with this
patch applied.

-------------------- search.c.diff --------------------
--- /tmp/search.c.~1.32~        2004-06-17 19:51:15.000000000 +0100
+++ /tmp/search.c       2004-06-17 19:53:01.000000000 +0100
@@ -482,15 +482,6 @@
     int cgi_fd;
     int env_err=0;
 
-    close(STDIN_FILENO);
-    cgi_fd=open("/dev/null",O_RDONLY);
-    if(cgi_fd!=STDIN_FILENO)
-      {
-       if(dup2(cgi_fd,STDIN_FILENO)==-1)
-          PrintMessage(Fatal,"Cannnot create standard input for %s search script 
[%!s].",name);
-       close(cgi_fd);
-      }
-
     if(fd!=STDOUT_FILENO)
       {
        close(STDOUT_FILENO);
@@ -501,6 +492,14 @@
        init_io(STDOUT_FILENO);
       }
 
+    cgi_fd=open("/dev/null",O_RDONLY);
+    if(cgi_fd!=STDIN_FILENO)
+      {
+       if(dup2(cgi_fd,STDIN_FILENO)==-1)
+          PrintMessage(Fatal,"Cannnot create standard input for %s search script 
[%!s].",name);
+       close(cgi_fd);
+      }
+
     if(dup(STDERR_FILENO)==-1 && errno==EBADF) /* stderr is not open */
       {
        cgi_fd=open("/dev/null",O_WRONLY);
-------------------- search.c.diff --------------------

-- 
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop                             [EMAIL PROTECTED]
                                      http://www.gedanken.demon.co.uk/

WWWOFFLE users page:
        http://www.gedanken.demon.co.uk/wwwoffle/version-2.8/user.html

Reply via email to