]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
gindent
authorwessels <>
Wed, 16 Oct 1996 00:06:22 +0000 (00:06 +0000)
committerwessels <>
Wed, 16 Oct 1996 00:06:22 +0000 (00:06 +0000)
src/cache_cf.cc
src/ftp.cc
src/ipcache.cc
src/pinger.cc
src/stat.cc

index 63b6edd7894521340a1c0ef6dde48201398450d5..d392ce76bbebc9fdca990cdeafa994593573dccb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cache_cf.cc,v 1.110 1996/10/15 18:05:56 wessels Exp $
+ * $Id: cache_cf.cc,v 1.111 1996/10/15 18:06:22 wessels Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -1427,15 +1427,15 @@ parseConfigFile(char *file_name)
        Config.dnsChildren = DefaultDnsChildrenMax;
     }
     if (Config.Program.redirect) {
-        if (Config.redirectChildren < 1) {
+       if (Config.redirectChildren < 1) {
            Config.redirectChildren = 0;
            safe_free(Config.Program.redirect);
-        } else if (Config.redirectChildren > DefaultRedirectChildrenMax) {
+       } else if (Config.redirectChildren > DefaultRedirectChildrenMax) {
            printf("WARNING: redirect_children was set to a bad value: %d\n",
-               Config.redirectChildren);
+               Config.redirectChildren);
            printf("Setting it to the maximum (%d).\n", DefaultRedirectChildrenMax);
            Config.redirectChildren = DefaultRedirectChildrenMax;
-        }
+       }
     }
     fclose(fp);
     configDoConfigure();
index c0dc4d5d9ff077cfb6553b1241a102bc7b45f213..a86b88978e47cf962c7a2bb2b4b6ffb2a239d705 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ftp.cc,v 1.66 1996/10/15 16:40:06 wessels Exp $
+ * $Id: ftp.cc,v 1.67 1996/10/15 18:06:23 wessels Exp $
  *
  * DEBUG: section 9     File Transfer Protocol (FTP)
  * AUTHOR: Harvest Derived
@@ -567,7 +567,6 @@ ftpStart(int unusedfd, char *url, request_t * request, StoreEntry * entry)
        squid_error_entry(entry, ERR_FTP_DISABLED, NULL);
        return COMM_ERROR;
     }
-
     ftpData = xcalloc(1, sizeof(FtpStateData));
     storeLockObject(ftpData->entry = entry, NULL, NULL);
     ftpData->request = requestLink(request);
@@ -706,7 +705,7 @@ ftpInitialize(void)
     struct timeval slp;
 
     if (!strcmp(ftpget, "none")) {
-        debug(9, 1, "ftpInitialize: ftpget is disabled.\n");
+       debug(9, 1, "ftpInitialize: ftpget is disabled.\n");
        return -1;
     }
     debug(9, 5, "ftpInitialize: Initializing...\n");
index 9c529ac80aca1503d828b69a83e285847a4a1766..10b33f877a3d69ef9c279918f3e3e66c2d94f2ab 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ipcache.cc,v 1.73 1996/10/15 18:05:58 wessels Exp $
+ * $Id: ipcache.cc,v 1.74 1996/10/15 18:06:24 wessels Exp $
  *
  * DEBUG: section 14    IP Cache
  * AUTHOR: Harvest Derived
@@ -145,7 +145,7 @@ static ipcache_entry *ipcache_GetNext _PARAMS((void));
 static ipcache_entry *ipcache_create _PARAMS((char *name));
 static void ipcache_add_to_hash _PARAMS((ipcache_entry *));
 static void ipcache_call_pending _PARAMS((ipcache_entry *));
-static ipcache_entry * ipcacheAddNew _PARAMS((char *, struct hostent *, ipcache_status_t));
+static ipcache_entry *ipcacheAddNew _PARAMS((char *, struct hostent *, ipcache_status_t));
 static void ipcacheAddHostent _PARAMS((ipcache_entry *, struct hostent *));
 static int ipcacheHasPending _PARAMS((ipcache_entry *));
 static ipcache_entry *ipcache_get _PARAMS((char *));
@@ -408,20 +408,20 @@ ipcache_add_to_hash(ipcache_entry * i)
 }
 
 static void
-ipcacheAddHostent(ipcache_entry *i, struct hostent *hp)
+ipcacheAddHostent(ipcache_entry * i, struct hostent *hp)
 {
-       int addr_count = 0;
-       int k;
-       safe_free(i->addrs.in_addrs);
-        while ((addr_count < 255) && *(hp->h_addr_list + addr_count))
-            ++addr_count;
-        i->addrs.count = (unsigned char) addr_count;
-        i->addrs.in_addrs = xcalloc(addr_count, sizeof(struct in_addr));
-        for (k = 0; k < addr_count; k++)
-            memcpy(&i->addrs.in_addrs[k].s_addr,
-                *(hp->h_addr_list + k),
-                hp->h_length);
-        i->status = IP_CACHED;
+    int addr_count = 0;
+    int k;
+    safe_free(i->addrs.in_addrs);
+    while ((addr_count < 255) && *(hp->h_addr_list + addr_count))
+       ++addr_count;
+    i->addrs.count = (unsigned char) addr_count;
+    i->addrs.in_addrs = xcalloc(addr_count, sizeof(struct in_addr));
+    for (k = 0; k < addr_count; k++)
+       memcpy(&i->addrs.in_addrs[k].s_addr,
+           *(hp->h_addr_list + k),
+           hp->h_length);
+    i->status = IP_CACHED;
 }
 
 static ipcache_entry *
@@ -795,8 +795,8 @@ ipcache_gethostbyname(char *name, int flags)
     if (i) {
        if (i->status == IP_PENDING || i->status == IP_DISPATCHED) {
            if (!BIT_TEST(flags, IP_BLOCKING_LOOKUP)) {
-               IpcacheStats.pending_hits++;
-               return NULL;
+               IpcacheStats.pending_hits++;
+               return NULL;
            }
        } else if (i->status == IP_NEGATIVE_CACHED) {
            IpcacheStats.negative_hits++;
@@ -811,21 +811,21 @@ ipcache_gethostbyname(char *name, int flags)
     IpcacheStats.misses++;
     if ((addrs = ipcacheCheckNumeric(name)))
        return addrs;
-    if (BIT_TEST(flags,IP_BLOCKING_LOOKUP)) {
+    if (BIT_TEST(flags, IP_BLOCKING_LOOKUP)) {
        IpcacheStats.ghbn_calls++;
-        debug(14, 3, "ipcache_gethostbyname: blocking on gethostbyname() for '%s'\n", name);
+       debug(14, 3, "ipcache_gethostbyname: blocking on gethostbyname() for '%s'\n", name);
        hp = gethostbyname(name);
        if (hp && hp->h_name && (hp->h_name[0] != '\0') && ip_table) {
            /* good address, cached */
            if (i == NULL) {
-               i = ipcacheAddNew(name, hp, IP_CACHED);
+               i = ipcacheAddNew(name, hp, IP_CACHED);
            } else {
                ipcacheAddHostent(i, hp);
            }
            i->expires = squid_curtime + Config.positiveDnsTtl;
 #if LIBRESOLV_DNS_TTL_HACK
            if (_dns_ttl_ > -1)
-               i->expires = squid_curtime + _dns_ttl_;
+               i->expires = squid_curtime + _dns_ttl_;
 #endif /* LIBRESOLV_DNS_TTL_HACK */
            return &i->addrs;
        }
index 518f0ee6df7cbd644f67eae54612d154e9c084c1..4c947284e2167e16d9241f9d319fbe6397395f99 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: pinger.cc,v 1.7 1996/10/14 21:29:02 wessels Exp $
+ * $Id: pinger.cc,v 1.8 1996/10/15 18:06:25 wessels Exp $
  *
  * DEBUG: section 37    ICMP Routines
  * AUTHOR: Duane Wessels
@@ -357,7 +357,7 @@ main(int argc, char *argv[])
            pingerRecv();
        if (10 + last_check_time > squid_curtime) {
            if (send(1, &tv, 0, 0) < 0)
-               return 1;
+               return 1;
            last_check_time = squid_curtime;
        }
     }
index 6b1797c19ebc9f4510e683c814a2b317d044b9aa..4dec73d68e6c663eb03482030685416d87af1dc1 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: stat.cc,v 1.87 1996/10/15 04:57:57 wessels Exp $
+ * $Id: stat.cc,v 1.88 1996/10/15 18:06:25 wessels Exp $
  *
  * DEBUG: section 18    Cache Manager Statistics
  * AUTHOR: Harvest Derived
@@ -644,7 +644,7 @@ memoryAccounted(void)
        meta_data.url_strings +
        meta_data.netdb_addrs * sizeof(netdbEntry) +
        meta_data.netdb_hosts * sizeof(struct _net_db_name) +
-       meta_data.client_info * client_info_sz +
+                 meta_data.client_info * client_info_sz +
                  meta_data.misc;
 }
 
@@ -932,22 +932,22 @@ parameter_get(cacheinfo * obj, StoreEntry * sentry)
 
 #if LOG_FULL_HEADERS
 static char c2x[] =
-    "000102030405060708090a0b0c0d0e0f"
-    "101112131415161718191a1b1c1d1e1f"
-    "202122232425262728292a2b2c2d2e2f"
-    "303132333435363738393a3b3c3d3e3f"
-    "404142434445464748494a4b4c4d4e4f"
-    "505152535455565758595a5b5c5d5e5f"
-    "606162636465666768696a6b6c6d6e6f"
-    "707172737475767778797a7b7c7d7e7f"
-    "808182838485868788898a8b8c8d8e8f"
-    "909192939495969798999a9b9c9d9e9f"
-    "a0a1a2a3a4a5a6a7a8a9aaabacadaeaf"
-    "b0b1b2b3b4b5b6b7b8b9babbbcbdbebf"
-    "c0c1c2c3c4c5c6c7c8c9cacbcccdcecf"
-    "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf"
-    "e0e1e2e3e4e5e6e7e8e9eaebecedeeef"
-    "f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff";
+"000102030405060708090a0b0c0d0e0f"
+"101112131415161718191a1b1c1d1e1f"
+"202122232425262728292a2b2c2d2e2f"
+"303132333435363738393a3b3c3d3e3f"
+"404142434445464748494a4b4c4d4e4f"
+"505152535455565758595a5b5c5d5e5f"
+"606162636465666768696a6b6c6d6e6f"
+"707172737475767778797a7b7c7d7e7f"
+"808182838485868788898a8b8c8d8e8f"
+"909192939495969798999a9b9c9d9e9f"
+"a0a1a2a3a4a5a6a7a8a9aaabacadaeaf"
+"b0b1b2b3b4b5b6b7b8b9babbbcbdbebf"
+"c0c1c2c3c4c5c6c7c8c9cacbcccdcecf"
+"d0d1d2d3d4d5d6d7d8d9dadbdcdddedf"
+"e0e1e2e3e4e5e6e7e8e9eaebecedeeef"
+"f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff";
 
 /* log_quote -- URL-style encoding on MIME headers. */