]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
gindent
authorwessels <>
Tue, 13 Aug 1996 05:22:33 +0000 (05:22 +0000)
committerwessels <>
Tue, 13 Aug 1996 05:22:33 +0000 (05:22 +0000)
src/comm.cc
src/dns.cc
src/fqdncache.cc
src/stat.cc
src/store.cc
src/url.cc

index be0982ae9364bc429e644b39b39ee548e019df13..d87ea9e70e62ffaad78c13449965467c4e968f04 100644 (file)
@@ -1,7 +1,7 @@
 
 
 /*
- * $Id: comm.cc,v 1.50 1996/08/12 23:21:43 wessels Exp $
+ * $Id: comm.cc,v 1.51 1996/08/12 23:22:33 wessels Exp $
  *
  * DEBUG: section 5     Socket Functions
  * AUTHOR: Harvest Derived
@@ -330,7 +330,7 @@ int comm_connect(sock, dest_host, dest_port)
     xmemcpy(&to_addr.sin_addr, hp->h_addr, hp->h_length);
     to_addr.sin_port = htons(dest_port);
     if (Config.Log.log_fqdn)
-        fqdncache_gethostbyaddr(to_addr.sin_addr, FQDN_LOOKUP_IF_MISS);
+       fqdncache_gethostbyaddr(to_addr.sin_addr, FQDN_LOOKUP_IF_MISS);
     return comm_connect_addr(sock, &to_addr);
 }
 
index e68bd906b35e6dfce83e8cb61c4251c734e6d29a..1dc5e5ffde3c711cf803a6f7f5981e557b631a97 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: dns.cc,v 1.3 1996/08/12 23:21:29 wessels Exp $
+ * $Id: dns.cc,v 1.4 1996/08/12 23:22:34 wessels Exp $
  *
  * DEBUG: section 34    Dnsserver interface
  * AUTHOR: Harvest Derived
@@ -271,15 +271,15 @@ void dnsShutdownServers()
     for (k = 0; k < NDnsServersAlloc; k++) {
        dnsData = *(dns_child_table + k);
        if (!(dnsData->flags & DNS_FLAG_ALIVE)) {
-            debug(34, 3, "dnsShutdownServers: #%d is NOT ALIVE.\n", dnsData->id);
+           debug(34, 3, "dnsShutdownServers: #%d is NOT ALIVE.\n", dnsData->id);
            continue;
        }
        if (dnsData->flags & DNS_FLAG_BUSY) {
-            debug(34, 3, "dnsShutdownServers: #%d is BUSY.\n", dnsData->id);
+           debug(34, 3, "dnsShutdownServers: #%d is BUSY.\n", dnsData->id);
            continue;
        }
        if (dnsData->flags & DNS_FLAG_CLOSING) {
-            debug(34, 3, "dnsShutdownServers: #%d is CLOSING.\n", dnsData->id);
+           debug(34, 3, "dnsShutdownServers: #%d is CLOSING.\n", dnsData->id);
            continue;
        }
        debug(34, 3, "dnsShutdownServers: sending '$shutdown' to dnsserver #%d\n", dnsData->id);
index 7635cf1a426f274db539e265fb34f824b01c2ea5..5275ae43bdabca0eecbc0290a8f42a3ef96ea8a9 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: fqdncache.cc,v 1.6 1996/07/26 19:43:56 wessels Exp $
+ * $Id: fqdncache.cc,v 1.7 1996/08/12 23:22:35 wessels Exp $
  *
  * DEBUG: section 35    FQDN Cache
  * AUTHOR: Harvest Derived
@@ -849,7 +849,6 @@ static void fqdncache_dnsDispatch(dns, f)
 /* initialize the fqdncache */
 void fqdncache_init()
 {
-
     debug(35, 3, "Initializing FQDN Cache...\n");
 
     memset(&FqdncacheStats, '\0', sizeof(FqdncacheStats));
@@ -904,6 +903,8 @@ char *fqdncache_gethostbyaddr(addr, flags)
     struct hostent *hp = NULL;
     unsigned int ip;
 
+    if (fqdn_table == 0)
+       return NULL;
     if (!name)
        fatal_dump("fqdncache_gethostbyaddr: NULL name");
     FqdncacheStats.requests++;
index 92aadc58ba6c711d8537d948766df8a34f44cd4c..284554190d3cfdafb2bbb0f81f7d50fd04cb3fa8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: stat.cc,v 1.51 1996/07/27 07:07:46 wessels Exp $
+ * $Id: stat.cc,v 1.52 1996/08/12 23:22:37 wessels Exp $
  *
  * DEBUG: section 18    Cache Manager Statistics
  * AUTHOR: Harvest Derived
@@ -906,7 +906,6 @@ void log_append(obj, url, caddr, size, action, method, http_code, msec, ident, h
        hier_host = hierData->host;
        hier_timeout = hierData->timeout;
     }
-
     if (obj->logfile_status == LOG_ENABLE) {
        if (Config.commonLogFormat)
            sprintf(tmp, "%s %s - [%s] \"%s %s\" %s %d\n",
@@ -1150,7 +1149,7 @@ char *stat_describe(entry)
     LOCAL_ARRAY(char, state, 256);
 
     state[0] = '\0';
-    sprintf (state, "%s/%s",
+    sprintf(state, "%s/%s",
        storeStatusStr[entry->store_status],
        pingStatusStr[entry->ping_status]);
     return (state);
@@ -1162,7 +1161,7 @@ char *mem_describe(entry)
     LOCAL_ARRAY(char, where, 100);
 
     where[0] = '\0';
-    sprintf (where, "D%d/%s/%s",
+    sprintf(where, "D%d/%s/%s",
        entry->swap_file_number,
        swapStatusStr[entry->swap_status],
        memStatusStr[entry->mem_status]);
index 0f1e7e5746173c0662353fea7cbd96f215147975..04c59021546a50d55dd0dbb434855af0b6ff1aaa 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: store.cc,v 1.77 1996/07/26 21:09:40 wessels Exp $
+ * $Id: store.cc,v 1.78 1996/08/12 23:22:38 wessels Exp $
  *
  * DEBUG: section 20    Storeage Manager
  * AUTHOR: Harvest Derived
@@ -158,26 +158,30 @@ static char *storeLogTags[] =
     "RELEASE"
 };
 
-char *memStatusStr[] = {
+char *memStatusStr[] =
+{
     "NOT_IN_MEMORY",
     "SWAPPING_IN",
     "IN_MEMORY"
 };
 
-char *pingStatusStr[] = {
+char *pingStatusStr[] =
+{
     "PING_WAITING",
     "PING_TIMEOUT",
     "PING_DONE",
     "PING_NONE"
 };
 
-char *storeStatusStr[] = {
+char *storeStatusStr[] =
+{
     "STORE_OK",
     "STORE_PENDING",
     "STORE_ABORTED"
 };
 
-char *swapStatusStr[] = {
+char *swapStatusStr[] =
+{
     "NO_SWAP",
     "SWAPPING_OUT",
     "SWAP_OK"
@@ -883,8 +887,8 @@ int storeRegister(e, fd, handler, data)
 
        /* allocate, and copy old pending list over to the new one */
        tmp = xcalloc(mem->pending_list_size, sizeof(struct pentry *));
-        for (j = 0; j < old_size; j++)
-            tmp[j] = mem->pending[j];
+       for (j = 0; j < old_size; j++)
+           tmp[j] = mem->pending[j];
 
        /* free the old list and set the new one */
        safe_free(mem->pending);
index eae39a0eed17656662989c035b16879908361530..ded138f28c5371d4a8318227601524f43ebed350 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: url.cc,v 1.27 1996/07/27 07:07:47 wessels Exp $
+ * $Id: url.cc,v 1.28 1996/08/12 23:22:39 wessels Exp $
  *
  * DEBUG: section 23    URL Parsing
  * AUTHOR: Duane Wessels
@@ -278,7 +278,7 @@ void requestUnlink(request)
     if (request == NULL)
        return;
     request->link_count--;
-    if (request->link_count) 
+    if (request->link_count)
        return;
     safe_free(request->hierarchy.host);
     put_free_request_t(request);