lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev lynx2.8.1pre.9


From: Wayne Buttles
Subject: Re: lynx-dev lynx2.8.1pre.9
Date: Sat, 10 Oct 1998 23:53:15 -0400 (EDT)

On Sat, 10 Oct 1998 address@hidden wrote:

> Remaining problems that I remember:

Missed one.  Lookups for me were still screwed up.  I think I finally
figured it out. I don't really understand it, but that hasn't stopped me
yet.  The previous logic just stopped working.  Here is a patch for pre 9.

==================================================

*** HTTCP.org   Sat Oct 10 14:53:16 1998
--- HTTCP.c     Sat Oct 10 23:12:14 1998
***************
*** 118,127 ****
  #ifdef _WINDOWS_NSL
         char host[512];
         struct hostent  *phost;     /* Pointer to host - See netdb.h */
  
  unsigned long _fork_func (void *arglist)
  {
!     return (unsigned long)(phost = gethostbyname(host));
  }
  #endif /* _WINDOWS_NSL */
  
--- 118,130 ----
  #ifdef _WINDOWS_NSL
         char host[512];
         struct hostent  *phost;     /* Pointer to host - See netdb.h */
+        int donelookup;
  
  unsigned long _fork_func (void *arglist)
  {
!        phost = gethostbyname(host);
!        donelookup = TRUE;
!        return (unsigned long)(phost);
  }
  #endif /* _WINDOWS_NSL */
  
***************
*** 642,648 ****
                if (!hThread)
                         MessageBox((void *)NULL, "CreateThread",
                                "CreateThread Failed", 0L);
!               while (!phost)
                        if (HTCheckForInterrupt())
                         {
                          /* Note that host is a character array and is not 
freed */
--- 645,653 ----
                if (!hThread)
                         MessageBox((void *)NULL, "CreateThread",
                                "CreateThread Failed", 0L);
! 
!               donelookup = FALSE;
!               while (!donelookup)
                        if (HTCheckForInterrupt())
                         {
                          /* Note that host is a character array and is not 
freed */
***************
*** 653,658 ****
--- 658,665 ----
                          return HT_INTERRUPTED;
                        };
        };
+       if (!phost) goto failed;
+       memcpy((void *)&soc_in->sin_addr, phost->h_addr, phost->h_length);
  #else /* !NSL_FORK, !DJGPP, !_WINDOWS_NSL: */
        {
                 struct hostent  *phost;
***************
*** 680,687 ****
  #endif /* !NSL_FORK */
  #ifndef _WINDOWS_NSL
        FREE(host);
- #else
-       memcpy((void *)&soc_in->sin_addr, phost->h_addr, phost->h_length);
  #endif /* _WINDOWS_NSL */
  
      }
--- 687,692 ----

reply via email to

[Prev in Thread] Current Thread [Next in Thread]