[alpha-dec-osf3.2 and squid 1.1.5] Problems with dnsserver

From: Tonny Madsen <Tonny.Madsen@dont-contact.us>
Date: 04 Feb 1997 15:11:09 +0100

Hi'

I still have problems with dnsserver in version 1.1.5 on
alpha-dec-osf3.2 using the navice C compiler. I don't know the exact
cause of the problem (yes, it *can* be a problem with the native C
compiler and implicit type cast :-<), but anyway... the following
patch fixes the problem.

/tonny

--------------------------------------------------
% diff -ru squid-1.1.5/src/dnsserver.c squid-1.1.5-tm/src/dnsserver.c
--- squid-1.1.5/src/dnsserver.c Thu Jan 2 08:20:28 1997
+++ squid-1.1.5-tm/src/dnsserver.c Tue Feb 4 15:09:20 1997
@@ -296,7 +296,7 @@
 
     for (;;) {
         int retry_count = 0;
- int addrbuf;
+ unsigned int addrbuf;
         memset(request, '\0', 256);
 
         /* read from ipcache */
@@ -318,7 +318,8 @@
         result = NULL;
         start = time(NULL);
         /* check if it's already an IP address in text form. */
- if (inet_addr(request) != inaddr_none) {
+ addrbuf = inet_addr(request);
+ if (addrbuf != inaddr_none) {
 #if NO_REVERSE_LOOKUP
             printf("$name %s\n", request);
             printf("$h_name %s\n", request);
@@ -330,7 +331,6 @@
             fflush(stdout);
             continue;
 #endif
- addrbuf = inet_addr(request);
             for (;;) {
                 result = gethostbyaddr((char *) &addrbuf, 4, AF_INET);
                 if (result || h_errno != TRY_AGAIN)

--------------------------------------------------

-- 
Tonny Madsen, NetMan a/s, Vandtaarnsvej 77, DK-2860 Soeborg, Denmark
E-mail: Tonny.Madsen@netman.dk 
Telephone: +45 39 66 40 20 Fax: +45 39 66 06 75
Received on Tue Feb 04 1997 - 06:38:38 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:34:23 MST