Index: ipcache.c
===================================================================
RCS file: /surf1/CVS/squid/src/ipcache.c,v
retrieving revision 1.26.2.52
diff -w -c -r1.26.2.52 ipcache.c
*** ipcache.c	1996/06/10 23:10:26	1.26.2.52
--- ipcache.c	1996/06/11 06:10:05
***************
*** 66,72 ****
  static int ipcache_testname _PARAMS((void));
  static char ipcache_status_char _PARAMS((ipcache_entry *));
  static dnsserver_t *dnsGetFirstAvailable _PARAMS((void));
- static int ipcacheHasPending _PARAMS((ipcache_entry *));
  static int ipcache_compareLastRef _PARAMS((ipcache_entry **, ipcache_entry **));
  static int ipcache_create_dnsserver _PARAMS((char *command));
  static int ipcache_dnsHandleRead _PARAMS((int, dnsserver_t *));
--- 66,71 ----
***************
*** 192,198 ****
      result = (ipcache_entry *) table_entry;
      if (i != result)
  	fatal_dump("ipcache_release: expected i == result!");
!     if (result->status == IP_PENDING) {
  	debug(14, 1, "ipcache_release: Someone called on a PENDING entry\n");
  	return;
      }
--- 191,197 ----
      result = (ipcache_entry *) table_entry;
      if (i != result)
  	fatal_dump("ipcache_release: expected i == result!");
!     if (ipcacheHasPending(result)) {
  	debug(14, 1, "ipcache_release: Someone called on a PENDING entry\n");
  	return;
      }
***************
*** 264,270 ****
  {
      if (i->lock)
  	return 0;
!     if (i->status == IP_PENDING && ipcacheHasPending(i))
  	return 0;
      if (i->ttl + i->lastref > squid_curtime)
  	return 0;
--- 263,269 ----
  {
      if (i->lock)
  	return 0;
!     if (ipcacheHasPending(i))
  	return 0;
      if (i->ttl + i->lastref > squid_curtime)
  	return 0;
***************
*** 301,307 ****
  	    LRU_list = xrealloc((char *) LRU_list,
  		LRU_cur_size * sizeof(ipcache_entry *));
  	}
! 	if (i->status == IP_PENDING && ipcacheHasPending(i))
  	    continue;
  	if (i->lock)
  	    continue;
--- 300,306 ----
  	    LRU_list = xrealloc((char *) LRU_list,
  		LRU_cur_size * sizeof(ipcache_entry *));
  	}
! 	if (ipcacheHasPending(i))
  	    continue;
  	if (i->lock)
  	    continue;
***************
*** 876,881 ****
--- 875,882 ----
       ipcache_entry *i;
  {
      struct _ip_pending *p = NULL;
+     if (i->status != IP_PENDING)
+ 	return 0;
      for (p = i->pending_head; p; p = p->next)
  	if (p->handler)
  	    return 1;
***************
*** 891,898 ****
      if (!ipcacheHasPending(i)) {
  	debug(14, 0, "dnsDispatch: skipping '%s' because no handler.\n",
  	    i->name);
- 	/* dont really expect to find status != IP_PENDING here... */
-         if (i->status == IP_PENDING)
  		ipcache_release(i);
  	return;
      }
--- 892,897 ----
