Re: 1.1.13 coredump fix

From: Peter Wemm <peter@dont-contact.us>
Date: Fri, 11 Jul 1997 12:51:17 +0800

"Ed Knowles" wrote:
> G'day All!
>
> --- icp.c.orig Thu Jul 10 21:10:34 1997
> +++ icp.c Thu Jul 10 21:10:45 1997
> @@ -1330,7 +1330,7 @@
> header.opcode, inet_ntoa(from.sin_addr));
> break;
> }
> - if (entry->mem_obj && entry->mem_obj->log_url == NULL)
> + if (entry && entry->mem_obj->log_url == NULL)
> storeSetLogUrl(entry, icp_request);
> if (icp_request)
> put_free_request_t(icp_request)

Hmm, just as a curiosity, this section of code (the if() and
storeSetLogUrl()) is in the tail end of icpHandleIcpV2() in squid-1.1.13,
but in the tail end of icpHandleIcpV3() in the NOVM.13 version. This
looks to me like a branch merging blunder. Ie: the diff between the
normal and novm version in this area is:

[diff -u --show-c-function ]
[...]
@@ -1330,8 +1225,6 @@ icpHandleIcpV2(int fd, struct sockaddr_i
                      ^^^^^^^^^^^^^^
            header.opcode, inet_ntoa(from.sin_addr));
        break;
     }
- if (entry && entry->mem_obj && entry->mem_obj->log_url == NULL)
- storeSetLogUrl(entry, icp_request);
     if (icp_request)
        put_free_request_t(icp_request);
 }
@@ -1462,6 +1355,8 @@ icpHandleIcpV3(int fd, struct sockaddr_i
                      ^^^^^^^^^^^^^^
            header.opcode, inet_ntoa(from.sin_addr));
        break;
     }
+ if (entry->mem_obj && entry->mem_obj->log_url == NULL)
+ storeSetLogUrl(entry, icp_request);
     if (icp_request)
        put_free_request_t(icp_request);
 }

Perhaps this piece of code is supposed to be in both the V2 and V3 icp
handlers?

Cheers,
-Peter
Received on Thu Jul 10 1997 - 21:52:45 MDT

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