]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
gindent
authorwessels <>
Wed, 16 Sep 1998 01:37:41 +0000 (01:37 +0000)
committerwessels <>
Wed, 16 Sep 1998 01:37:41 +0000 (01:37 +0000)
18 files changed:
src/HttpHeader.cc
src/acl.cc
src/comm_select.cc
src/globals.h
src/icmp.cc
src/icp_v2.cc
src/main.cc
src/neighbors.cc
src/net_db.cc
src/peer_digest.cc
src/protos.h
src/stat.cc
src/store.cc
src/store_dir.cc
src/store_key_md5.cc
src/store_rebuild.cc
src/structs.h
src/unlinkd.cc

index d9b5fddc1a20bf12763719b2b24fb6691b9a730e..7c0f4395e9598ded4e8c145dc4163fa79ea6a3f6 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpHeader.cc,v 1.54 1998/08/26 05:36:42 wessels Exp $
+ * $Id: HttpHeader.cc,v 1.55 1998/09/15 19:37:41 wessels Exp $
  *
  * DEBUG: section 55    HTTP Header
  * AUTHOR: Alex Rousskov
@@ -243,7 +243,7 @@ httpHeaderInitModule()
     httpHeaderCalcMask(&RequestHeadersMask, (const int *) GeneralHeadersArr, countof(GeneralHeadersArr));
     httpHeaderCalcMask(&RequestHeadersMask, (const int *) EntityHeadersArr, countof(EntityHeadersArr));
     /* init header stats */
-    assert(HttpHeaderStatCount == hoReply+1);
+    assert(HttpHeaderStatCount == hoReply + 1);
     for (i = 0; i < HttpHeaderStatCount; i++)
        httpHeaderStatInit(HttpHeaderStats + i, HttpHeaderStats[i].label);
     HttpHeaderStats[hoRequest].owner_mask = &RequestHeadersMask;
index 761071dd1d3a408c5f2650cee8da6413f369e4db..d3e098c0494476ea0c53341486e07efcead7c933 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: acl.cc,v 1.182 1998/09/14 22:27:57 wessels Exp $
+ * $Id: acl.cc,v 1.183 1998/09/15 19:37:43 wessels Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -271,9 +271,9 @@ aclParseIntRange(void *curlist)
        q->i = atoi(t);
        t = strchr(t, '-');
        if (t && *(++t))
-               q->j = atoi(t);
+           q->j = atoi(t);
        else
-               q->j = q->i;
+           q->j = q->i;
        *(Tail) = q;
        Tail = &q->next;
     }
@@ -1111,9 +1111,9 @@ aclMatchIntegerRange(intrange * data, int i)
     prev = NULL;
     while (data) {
        if (i < data->i) {
-               (void) 0;
+           (void) 0;
        } else if (i > data->j) {
-               (void) 0;
+           (void) 0;
        } else {
            /* matched */
            if (prev != NULL) {
@@ -1698,13 +1698,13 @@ aclDestroyDenyInfoList(acl_deny_info_list ** list)
 }
 
 static void
-aclDestroyIntRange(intrange *list)
+aclDestroyIntRange(intrange * list)
 {
     intrange *w = NULL;
     intrange *n = NULL;
     for (w = list; w; w = n) {
-        n = w->next;
-        safe_free(w);
+       n = w->next;
+       safe_free(w);
     }
 }
 
index 572b588f886ffb89b116a7bae94586bcadbc1cf9..19316c07efe40e64d2618433d39afad491573443 100644 (file)
@@ -1,7 +1,7 @@
 
 
 /*
- * $Id: comm_select.cc,v 1.10 1998/09/15 06:25:17 wessels Exp $
+ * $Id: comm_select.cc,v 1.11 1998/09/15 19:37:46 wessels Exp $
  *
  * DEBUG: section 5     Socket Functions
  *
@@ -218,7 +218,7 @@ comm_poll_icp_incoming(void)
     nevents = comm_check_incoming_poll_handlers(nfds, fds);
     incoming_icp_interval += Config.comm_incoming.icp_average - nevents;
     if (incoming_icp_interval < Config.comm_incoming.icp_min_poll)
-       incoming_icp_interval = Config.comm_incoming.icp_min_poll;
+       incoming_icp_interval = Config.comm_incoming.icp_min_poll;
     if (incoming_icp_interval > MAX_INCOMING_INTERVAL)
        incoming_icp_interval = MAX_INCOMING_INTERVAL;
     if (nevents > INCOMING_ICP_MAX)
@@ -245,7 +245,7 @@ comm_poll_http_incoming(void)
     incoming_http_interval = incoming_http_interval
        + Config.comm_incoming.http_average - nevents;
     if (incoming_http_interval < Config.comm_incoming.http_min_poll)
-       incoming_http_interval = Config.comm_incoming.http_min_poll;
+       incoming_http_interval = Config.comm_incoming.http_min_poll;
     if (incoming_http_interval > MAX_INCOMING_INTERVAL)
        incoming_http_interval = MAX_INCOMING_INTERVAL;
     if (nevents > INCOMING_HTTP_MAX)
index 898c18629434e8ef9101ad688ccff761ef0279d8..18b80fac26266951452e14d46a26c9470d1f4076 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: globals.h,v 1.67 1998/09/09 20:05:49 wessels Exp $
+ * $Id: globals.h,v 1.68 1998/09/15 19:37:47 wessels Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -142,4 +142,4 @@ extern time_t delay_pools_last_update;      /* 0 */
 extern int refresh_nocache_hack;       /* 0 */
 #endif
 extern request_flags null_request_flags;
-extern int open_disk_fd;               /* 0 */
+extern int open_disk_fd;       /* 0 */
index 749b965f2da8d3e177e0772a2610870a750ebc1c..15e75a42fa82deed709e5b1c173607786735feed 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: icmp.cc,v 1.64 1998/09/11 17:07:43 wessels Exp $
+ * $Id: icmp.cc,v 1.65 1998/09/15 19:37:49 wessels Exp $
  *
  * DEBUG: section 37    ICMP Routines
  * AUTHOR: Duane Wessels
@@ -132,6 +132,7 @@ icmpHandleSourcePing(const struct sockaddr_in *from, const char *buf)
     /* call neighborsUdpAck even if ping_status != PING_WAITING */
     neighborsUdpAck(key, &header, from);
 }
+
 #endif /* USE_ICMP */
 
 void
index 9b8c34c43cb59a76db65f2e762268b64ab3a8eae..793d7c3475fd6192d2d75ae892aeafe45d08ecf0 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: icp_v2.cc,v 1.51 1998/09/11 17:07:43 wessels Exp $
+ * $Id: icp_v2.cc,v 1.52 1998/09/15 19:37:49 wessels Exp $
  *
  * DEBUG: section 12    Internet Cache Protocol
  * AUTHOR: Duane Wessels
@@ -537,7 +537,7 @@ icpCount(void *buf, int which, size_t len, int delay)
 static cache_key queried_keys[N_QUERIED_KEYS][MD5_DIGEST_CHARS];
 
 int
-icpSetCacheKey(const cache_key *key)
+icpSetCacheKey(const cache_key * key)
 {
     static int reqnum = 0;
     if (++reqnum < 0)
index f153f279477b7a50ab5a64913c0caee54220ee09..bb328f5e41dafe0989ae7af7823edeba33a5e851 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: main.cc,v 1.271 1998/09/15 06:34:55 wessels Exp $
+ * $Id: main.cc,v 1.272 1998/09/15 19:37:51 wessels Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -329,7 +329,7 @@ mainReconfigure(void)
     authenticateOpenServers();
     serverConnectionsOpen();
     if (theOutIcpConnection >= 0) {
-        if (!Config2.Accel.on || Config.onoff.accel_with_proxy)
+       if (!Config2.Accel.on || Config.onoff.accel_with_proxy)
            neighbors_open(theOutIcpConnection);
        else
            debug(1, 1) ("ICP port disabled in httpd_accelerator mode\n");
@@ -447,7 +447,7 @@ mainInitialize(void)
     }
     serverConnectionsOpen();
     if (theOutIcpConnection >= 0) {
-        if (!Config2.Accel.on || Config.onoff.accel_with_proxy)
+       if (!Config2.Accel.on || Config.onoff.accel_with_proxy)
            neighbors_open(theOutIcpConnection);
        else
            debug(1, 1) ("ICP port disabled in httpd_accelerator mode\n");
index 11d09381fc318807add8b0f46e6dbe855b76ebad..5f1b2612a939c8bcbbef8a602c12d16379bd0bf1 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: neighbors.cc,v 1.248 1998/09/14 22:17:59 wessels Exp $
+ * $Id: neighbors.cc,v 1.249 1998/09/15 19:37:52 wessels Exp $
  *
  * DEBUG: section 15    Neighbor Routines
  * AUTHOR: Harvest Derived
@@ -752,7 +752,7 @@ neighborsUdpAck(const cache_key * key, icp_common_t * header, const struct socka
        opcode_d, storeKeyText(key), p ? p->host : "source");
     if (p) {
        ntype = neighborType(p, mem->request);
-        neighborUpdateRtt(p, mem);
+       neighborUpdateRtt(p, mem);
     }
     if (ignoreMulticastReply(p, mem)) {
        neighborCountIgnored(p);
@@ -1040,7 +1040,7 @@ peerCountMcastPeersDone(void *data)
 }
 
 static void
-peerCountHandleIcpReply(peer * p, peer_t type, protocol_t proto, void * hdrnotused, void *data)
+peerCountHandleIcpReply(peer * p, peer_t type, protocol_t proto, void *hdrnotused, void *data)
 {
     ps_state *psstate = data;
     StoreEntry *fake = psstate->entry;
@@ -1147,16 +1147,16 @@ dump_peers(StoreEntry * sentry, peer * peers)
                percent(e->htcp.counts[1], e->stats.pings_acked));
        } else {
 #endif
-       for (op = ICP_INVALID; op < ICP_END; op++) {
-           if (e->icp.counts[op] == 0)
-               continue;
-           storeAppendPrintf(sentry, "    %12.12s : %8d %3d%%\n",
-               icp_opcode_str[op],
-               e->icp.counts[op],
-               percent(e->icp.counts[op], e->stats.pings_acked));
-       }
+           for (op = ICP_INVALID; op < ICP_END; op++) {
+               if (e->icp.counts[op] == 0)
+                   continue;
+               storeAppendPrintf(sentry, "    %12.12s : %8d %3d%%\n",
+                   icp_opcode_str[op],
+                   e->icp.counts[op],
+                   percent(e->icp.counts[op], e->stats.pings_acked));
+           }
 #if USE_HTCP
-}
+       }
 #endif
        if (e->last_fail_time) {
            storeAppendPrintf(sentry, "Last failed connect() at: %s\n",
@@ -1165,8 +1165,8 @@ dump_peers(StoreEntry * sentry, peer * peers)
        if (e->pinglist != NULL) {
            storeAppendPrintf(sentry, "DOMAIN LIST: ");
            for (d = e->pinglist; d; d = d->next) {
-                   storeAppendPrintf(sentry, "%s%s ",
-                       d->do_ping ? null_string : "!", d->domain);
+               storeAppendPrintf(sentry, "%s%s ",
+                   d->do_ping ? null_string : "!", d->domain);
            }
            storeAppendPrintf(sentry, "\n");
        }
index 65cb05f72f7fbd8b3d0a135ca14e382b4f405956..c844275edaf04493ffc7039ec880ce40f77fad0f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: net_db.cc,v 1.126 1998/09/01 23:31:24 wessels Exp $
+ * $Id: net_db.cc,v 1.127 1998/09/15 19:37:54 wessels Exp $
  *
  * DEBUG: section 38    Network Measurement Database
  * AUTHOR: Duane Wessels
@@ -794,12 +794,12 @@ void
 netdbHostData(const char *host, int *samp, int *rtt, int *hops)
 {
 #if USE_ICMP
-       netdbEntry *n = netdbLookupHost(host);
-       if (n == NULL)
-               return;
-       *samp = n->pings_recv;
-       *rtt = (int) (n->rtt + 0.5);
-       *hops = (int) (n->hops + 0.5);
+    netdbEntry *n = netdbLookupHost(host);
+    if (n == NULL)
+       return;
+    *samp = n->pings_recv;
+    *rtt = (int) (n->rtt + 0.5);
+    *hops = (int) (n->hops + 0.5);
 #endif
 }
 
index 319b1b19a792c25e08771879102691ff1e858e63..19ea7a22c129e341a89db100f3d8f067c780c215 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: peer_digest.cc,v 1.51 1998/09/14 23:42:07 wessels Exp $
+ * $Id: peer_digest.cc,v 1.52 1998/09/15 19:37:55 wessels Exp $
  *
  * DEBUG: section 72    Peer Digest Routines
  * AUTHOR: Alex Rousskov
@@ -528,7 +528,7 @@ peerDigestFetchFinish(DigestFetchState * fetch, char *buf, const char *err_msg)
     if (err_msg) {
        if (cbdataValid(peer))
            debug(72, 1) ("disabling corrupted (%s) digest from %s\n",
-               err_msg, peer->host);
+               err_msg, peer->host);
        if (peer->digest.cd) {
            cacheDigestDestroy(peer->digest.cd);
            peer->digest.cd = NULL;
index 9291c504553d0af99121dcf9da26d9e2f69b2fbf..918189236583033cd1877c2888aa3744f0babc07 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: protos.h,v 1.266 1998/09/15 06:34:56 wessels Exp $
+ * $Id: protos.h,v 1.267 1998/09/15 19:37:56 wessels Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -491,8 +491,8 @@ extern int icpCheckUdpHit(StoreEntry *, request_t * request);
 extern void icpConnectionsOpen(void);
 extern void icpConnectionShutdown(void);
 extern void icpConnectionClose(void);
-extern int icpSetCacheKey(const cache_key *key);
-extern const cache_key * icpGetCacheKey(const char *url, int reqnum);
+extern int icpSetCacheKey(const cache_key * key);
+extern const cache_key *icpGetCacheKey(const char *url, int reqnum);
 
 extern void ipcache_nbgethostbyname(const char *name,
     IPH * handler,
index 617b0f6ac7d424ee9f01d371a970f177fd94da4c..9c4be351a2e9118e70e271fa68ef004e4f82aa2f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: stat.cc,v 1.288 1998/09/14 22:18:01 wessels Exp $
+ * $Id: stat.cc,v 1.289 1998/09/15 19:37:58 wessels Exp $
  *
  * DEBUG: section 18    Cache Manager Statistics
  * AUTHOR: Harvest Derived
@@ -745,7 +745,7 @@ statAvgDump(StoreEntry * sentry, int minutes, int hours)
     storeAppendPrintf(sentry, "select_fds = %f/sec\n",
        XAVG(select_fds));
     storeAppendPrintf(sentry, "average_select_fd_period = %f/fd\n",
-        f->select_fds > l->select_fds ?
+       f->select_fds > l->select_fds ?
        (f->select_time - l->select_time) / (f->select_fds - l->select_fds)
        : 0.0);
     x = statHistDeltaMedian(&l->select_fds_hist, &f->select_fds_hist);
index 0eeb1a36b0fb3daa9f656861842689c699faad12..c439f4fdc6cd027ba502d012a7f6c863405d8dea 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store.cc,v 1.459 1998/09/15 04:23:39 wessels Exp $
+ * $Id: store.cc,v 1.460 1998/09/15 19:38:00 wessels Exp $
  *
  * DEBUG: section 20    Storage Manager
  * AUTHOR: Harvest Derived
@@ -569,6 +569,7 @@ storePPNR(StoreEntry * e)
     assert(e->flags.entry_fwd_hdr_wait);
     e->flags.entry_fwd_hdr_wait = 0;
 }
+
 #endif /* PPNR_WIP */
 
 /*
index c499c414543bf5c782e516248e5ceb50720bfda8..889f37d09f10769e973f737a14233bf4ddc72361 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir.cc,v 1.76 1998/09/14 21:28:14 wessels Exp $
+ * $Id: store_dir.cc,v 1.77 1998/09/15 19:38:02 wessels Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -799,20 +799,20 @@ storeDirConfigure(void)
     fileMap *fm;
     Config.Swap.maxSize = 0;
     for (i = 0; i < Config.cacheSwap.n_configured; i++) {
-        SD = &Config.cacheSwap.swapDirs[i];;
-        Config.Swap.maxSize += SD->max_size;
-        n = 2 * SD->max_size / Config.Store.avgObjectSize;
-        if (NULL == SD->map) {
-            /* first time */
-            SD->map = file_map_create(n);
-        } else if (n > SD->map->max_n_files) {
-            /* it grew, need to expand */
-            fm = file_map_create(n);
-            filemapCopy(SD->map, fm);
-            filemapFreeMemory(SD->map);
-            SD->map = fm;
-        }
-        /* else it shrunk, and we leave the old one in place */
+       SD = &Config.cacheSwap.swapDirs[i];;
+       Config.Swap.maxSize += SD->max_size;
+       n = 2 * SD->max_size / Config.Store.avgObjectSize;
+       if (NULL == SD->map) {
+           /* first time */
+           SD->map = file_map_create(n);
+       } else if (n > SD->map->max_n_files) {
+           /* it grew, need to expand */
+           fm = file_map_create(n);
+           filemapCopy(SD->map, fm);
+           filemapFreeMemory(SD->map);
+           SD->map = fm;
+       }
+       /* else it shrunk, and we leave the old one in place */
     }
 }
 
@@ -823,6 +823,6 @@ storeDirDiskFull(int fn)
     SwapDir *SD = &Config.cacheSwap.swapDirs[dirn];
     assert(0 <= dirn && dirn < Config.cacheSwap.n_configured);
     SD->max_size = SD->cur_size;
-    debug(20, 1)("WARNING: Shrinking cache_dir #%d to %d KB\n",
+    debug(20, 1) ("WARNING: Shrinking cache_dir #%d to %d KB\n",
        dirn, SD->cur_size);
 }
index d2e11e59e1384ce7ef71ee7f7f2b457664880d84..f1e55355ca948133c808f2d998e3e38d233bb483 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_key_md5.cc,v 1.15 1998/09/11 17:07:50 wessels Exp $
+ * $Id: store_key_md5.cc,v 1.16 1998/09/15 19:38:02 wessels Exp $
  *
  * DEBUG: section 20    Storage Manager MD5 Cache Keys
  * AUTHOR: Duane Wessels
@@ -128,7 +128,7 @@ storeKeyDup(const cache_key * key)
 }
 
 cache_key *
-storeKeyCopy(cache_key * dst, const cache_key *src)
+storeKeyCopy(cache_key * dst, const cache_key * src)
 {
     xmemcpy(dst, src, MD5_DIGEST_CHARS);
     return dst;
@@ -137,7 +137,7 @@ storeKeyCopy(cache_key * dst, const cache_key *src)
 void
 storeKeyFree(const cache_key * key)
 {
-    memFree(MEM_MD5_DIGEST, (void *)key);
+    memFree(MEM_MD5_DIGEST, (void *) key);
 }
 
 int
index 5b8a036107fd02f832e0b59fa5fb377096c94a4c..56bf7aaf90bf1d71817f8828213f39123744593e 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_rebuild.cc,v 1.49 1998/09/14 23:42:37 wessels Exp $
+ * $Id: store_rebuild.cc,v 1.50 1998/09/15 19:38:03 wessels Exp $
  *
  * DEBUG: section 20    Store Rebuild Routines
  * AUTHOR: Duane Wessels
@@ -315,15 +315,15 @@ storeRebuildFromSwapLog(rebuild_dir * d)
        } else if (used && e && e->swap_file_number == s.swap_file_number) {
            /* swapfile taken, same URL, newer, update meta */
            if (e->store_status == STORE_OK) {
-               e->lastref = s.timestamp;
-               e->timestamp = s.timestamp;
-               e->expires = s.expires;
-               e->lastmod = s.lastmod;
-               e->flags = s.flags;
-               e->refcount += s.refcount;
+               e->lastref = s.timestamp;
+               e->timestamp = s.timestamp;
+               e->expires = s.expires;
+               e->lastmod = s.lastmod;
+               e->flags = s.flags;
+               e->refcount += s.refcount;
            } else {
                debug_trap("storeRebuildFromSwapLog: bad condition");
-               debug(20,1)("\tSee %s:%d\n", __FILE__, __LINE__);
+               debug(20, 1) ("\tSee %s:%d\n", __FILE__, __LINE__);
            }
            continue;
        } else if (used) {
index d72fa06cbf64dbda6987ef431c12d7f0369c9a69..c105fe02efe83743fa5416692cc89abd7785e25c 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: structs.h,v 1.229 1998/09/15 06:35:24 wessels Exp $
+ * $Id: structs.h,v 1.230 1998/09/15 19:38:04 wessels Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -1233,7 +1233,7 @@ struct _store_flags {
     unsigned short entry_unused_08:1;
 #else
     unsigned short entry_fwd_hdr_wait:1;
-#endif                          /* PPNR_WIP */
+#endif                         /* PPNR_WIP */
     unsigned short key_private:1;
     unsigned short entry_dispatched:1;
     unsigned short entry_cachable:1;
@@ -1242,7 +1242,7 @@ struct _store_flags {
     unsigned short delay_sending:1;
     unsigned short entry_revalidate:1;
     unsigned short entry_special:1;
-#else  /* ENDIAN */
+#else                          /* ENDIAN */
     unsigned short entry_special:1;
     unsigned short entry_revalidate:1;
     unsigned short delay_sending:1;
@@ -1259,7 +1259,7 @@ struct _store_flags {
     unsigned short entry_negcached:1;
     unsigned short entry_validated:1;
     unsigned short entry_bad_length:1;
-#endif /* ENDIAN */
+#endif                         /* ENDIAN */
 };
 
 struct _StoreEntry {
index f3e257f5654f20d08ad04c45ba3122fefa56ac8f..f8fc97bdab56a14fc4c3f92fdf692cfd803b6f32 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: unlinkd.cc,v 1.27 1998/09/10 19:56:28 wessels Exp $
+ * $Id: unlinkd.cc,v 1.28 1998/09/15 19:38:06 wessels Exp $
  *
  * DEBUG: section 12    Unlink Daemon
  * AUTHOR: Duane Wessels
@@ -117,7 +117,7 @@ unlinkdClose(void)
     debug(12, 1) ("Closing unlinkd pipe on FD %d\n", unlinkd_wfd);
     file_close(unlinkd_wfd);
     if (unlinkd_wfd != unlinkd_rfd)
-        file_close(unlinkd_rfd);
+       file_close(unlinkd_rfd);
     unlinkd_wfd = -1;
     unlinkd_rfd = -1;
 #endif