]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
removed old, unused code
authorwessels <>
Sat, 9 May 1998 05:29:25 +0000 (05:29 +0000)
committerwessels <>
Sat, 9 May 1998 05:29:25 +0000 (05:29 +0000)
src/asn.cc
src/errorpage.cc
src/ipcache.cc
src/mime.cc
src/net_db.cc
src/store_client.cc
src/store_dir.cc
src/store_rebuild.cc
src/url.cc
src/urn.cc

index fe6f562572f71bb423435733beaf991662620c2b..08a055d89e4b7835e7bc302ac5bd5078cbc46994 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: asn.cc,v 1.32 1998/05/01 17:37:12 wessels Exp $
+ * $Id: asn.cc,v 1.33 1998/05/08 23:29:25 wessels Exp $
  *
  * DEBUG: section 53    AS Number handling
  * AUTHOR: Duane Wessels, Kostas Anagnostakis
@@ -292,15 +292,11 @@ asnAddNet(char *as_string, int as_number)
     *t = '\0';
     addr = inet_addr(as_string);
     bitl = atoi(t + 1);
-#if 0
-    mask = (1 << bitl) - 1;
-#else
     if (bitl < 0)
        bitl = 0;
     if (bitl > 32)
        bitl = 32;
     mask = bitl ? 0xfffffffful << (32 - bitl) : 0;
-#endif
 
     in_a.s_addr = addr;
     in_m.s_addr = mask;
index d0ced48205457cb5f08602a8b8762aba8cbf3aa3..51822a12eb8c867bb0e5ed9cb4c1177de359f055 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: errorpage.cc,v 1.130 1998/05/08 22:35:06 wessels Exp $
+ * $Id: errorpage.cc,v 1.131 1998/05/08 23:29:26 wessels Exp $
  *
  * DEBUG: section 4     Error Generation
  * AUTHOR: Duane Wessels
@@ -242,12 +242,10 @@ errorAppendEntry(StoreEntry * entry, ErrorState * err)
 {
     HttpReply *rep;
     MemObject *mem = entry->mem_obj;
-#if 0
     /*
      *  Kostas sez PUT "success" replies might not be STORE_PENDING?
      */
-    assert(entry->store_status == STORE_PENDING);
-#endif
+    /* assert(entry->store_status == STORE_PENDING); */
     assert(mem != NULL);
     assert(mem->inmem_hi == 0);
     storeBuffer(entry);
index 61d96c08b0537ebbc700a1dae4ca95f39bf91ce8..ea46ae8e2090559ea0438c1e80df93e57bd21e9f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ipcache.cc,v 1.182 1998/04/24 07:09:37 wessels Exp $
+ * $Id: ipcache.cc,v 1.183 1998/05/08 23:29:27 wessels Exp $
  *
  * DEBUG: section 14    IP Cache
  * AUTHOR: Harvest Derived
@@ -879,30 +879,6 @@ ipcacheUnlockEntry(ipcache_entry * i)
        ipcache_release(i);
 }
 
-#if OLD_CODE
-void
-ipcacheCycleAddr(const char *name)
-{
-    ipcache_entry *i;
-    unsigned char fullcircle;
-    if ((i = ipcache_get(name)) == NULL)
-       return;
-    if (i->status != IP_CACHED)
-       return;
-    ia = &i->addrs;
-    fullcircle = ia->cur;
-    while (ia->bad_mask[ia->cur]) {
-       if (++ia->cur == ia->count)
-           ia->cur = 0;
-       if (ia->cur == fullcircle) {    /* All bad, just use next one */
-           if (++ia->cur == ia->count)
-               ia->cur = 0;
-           break;
-       }
-    }
-}
-#endif
-
 void
 ipcacheCycleAddr(const char *name, ipcache_addrs * ia)
 {
index 871e96039e38253568d90207e44bcb9672a647e7..e4ae6fda02575eba0b7b8cefba1f34a0792d063b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: mime.cc,v 1.64 1998/05/05 03:49:59 wessels Exp $
+ * $Id: mime.cc,v 1.65 1998/05/08 23:29:28 wessels Exp $
  *
  * DEBUG: section 25    MIME Parsing
  * AUTHOR: Harvest Derived
@@ -184,27 +184,6 @@ mime_get_header_field(const char *mime, const char *name, const char *prefix)
     return NULL;
 }
 
-#if OLD_CODE
-/* need to take the lowest, non-zero pointer to the end of the headers.
- * The headers end at the first empty line */
-char *
-mime_headers_end(const char *mime)
-{
-    const char *p1, *p2;
-    const char *end = NULL;
-    p1 = strstr(mime, "\n\r\n");
-    p2 = strstr(mime, "\n\n");
-    if (p1 && p2)
-       end = p1 < p2 ? p1 : p2;
-    else
-       end = p1 ? p1 : p2;
-    if (end)
-       end += (end == p1 ? 3 : 2);
-    return (char *) end;
-}
-
-#endif
-
 size_t
 headersEnd(const char *mime, size_t l)
 {
index de989a97d47bdedd808e76abb6f77346ddeb5498..082cba18030e9067de097f5916326f8a6a9aecba 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: net_db.cc,v 1.94 1998/05/08 21:22:16 wessels Exp $
+ * $Id: net_db.cc,v 1.95 1998/05/08 23:29:28 wessels Exp $
  *
  * DEBUG: section 37    Network Measurement Database
  * AUTHOR: Duane Wessels
@@ -863,9 +863,6 @@ variable_list *
 snmp_netdbFn(variable_list * Var, snint * ErrP)
 {
     variable_list *Answer;
-#if 0
-    int cnt;
-#endif
     static char key[15];
 
     static netdbEntry *n = NULL;
index 6dc87067b3bc52f8be9b55d078e71cc871ed3c26..f797074b28ba5e42466045eaa8ba24e693066884 100644 (file)
@@ -430,21 +430,6 @@ storePendingNClients(const StoreEntry * e)
 {
     MemObject *mem = e->mem_obj;
     int npend = NULL == mem ? 0 : mem->nclients;
-#if OLD_CODE
-    store_client *sc;
-    store_client *nx = NULL;
-    if (mem == NULL)
-       return 0;
-    for (sc = mem->clients; sc; sc = nx) {
-       nx = sc->next;
-       /* Changed from callback_data to just callback.  There can be no use */
-       /* for callback_data without a callback, and sc->callback we know */
-       /* gets reset, but not necessarily sc->callback_data */
-       if (sc->callback == NULL)
-           continue;
-       npend++;
-    }
-#endif
     debug(20, 3) ("storePendingNClients: returning %d\n", npend);
     return npend;
 }
index 333bfd5db61c1396ad331545768bd71827d01dd3..43b515033816df99a19e66aa417e635049abb62c 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir.cc,v 1.65 1998/05/07 20:49:19 wessels Exp $
+ * $Id: store_dir.cc,v 1.66 1998/05/08 23:29:30 wessels Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -638,13 +638,6 @@ storeDirWriteCleanLogs(int reopen)
     if (store_rebuilding) {
        debug(20, 1) ("Not currently OK to rewrite swap log.\n");
        debug(20, 1) ("storeDirWriteCleanLogs: Operation aborted.\n");
-#if DONT
-       /*
-        * why did we want to close the current swap logs here?
-        * DW/1.2.beta19
-        */
-       storeDirCloseSwapLogs();
-#endif
        return 0;
     }
     debug(20, 1) ("storeDirWriteCleanLogs: Starting...\n");
index 8afb33677ca3285048ddfcfab877500ef43e5728..e5835cf12eb85b3e27301588fdb175be75072dec 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: store_rebuild.cc,v 1.35 1998/04/27 19:16:12 wessels Exp $
+ * $Id: store_rebuild.cc,v 1.36 1998/05/08 23:29:30 wessels Exp $
  *
  * DEBUG: section 20    Store Rebuild Routines
  * AUTHOR: Duane Wessels
@@ -179,17 +179,6 @@ storeRebuildFromDirectory(rebuild_dir * d)
            continue;
        }
        tmpe.key = key;
-#if OLD_CODE
-       if (tmpe.swap_file_sz == 0) {
-           RebuildState.invalid++;
-           x = log(++RebuildState.zero_object_sz) / log(10.0);
-           if (0.0 == x - (double) (int) x)
-               debug(20, 1) ("WARNING: %d swapfiles found with ZERO size\n",
-                   RebuildState.zero_object_sz);
-           storeUnlinkFileno(sfileno);
-           continue;
-       }
-#endif
        /* check sizes */
        if (tmpe.swap_file_sz == 0) {
            tmpe.swap_file_sz = sb.st_size;
index adb10b750551570c98faea7c212e46416eea2e9a..b6b1ac6b524097d9b7802be33d01da479af87ce7 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: url.cc,v 1.90 1998/05/08 06:34:59 wessels Exp $
+ * $Id: url.cc,v 1.91 1998/05/08 23:29:31 wessels Exp $
  *
  * DEBUG: section 23    URL Parsing
  * AUTHOR: Duane Wessels
@@ -277,11 +277,7 @@ urlParse(method_t method, char *url)
     xstrncpy(request->host, host, SQUIDHOSTNAMELEN);
     xstrncpy(request->login, login, MAX_LOGIN_SZ);
     request->port = (u_short) port;
-#if OLD_CODE
-    xstrncpy(request->urlpath, urlpath, MAX_URL);
-#else
     stringReset(&request->urlpath, urlpath);
-#endif
     request->max_age = -1;
     request->max_forwards = -1;
     return request;
@@ -295,11 +291,7 @@ urnParse(method_t method, char *urn)
     request = memAllocate(MEM_REQUEST_T);
     request->method = method;
     request->protocol = PROTO_URN;
-#if OLD_CODE
-    xstrncpy(request->urlpath, &urn[4], MAX_URL);
-#else
     stringReset(&request->urlpath, urn + 4);
-#endif
     request->max_age = -1;
     request->max_forwards = -1;
     return request;
index 7b3f527b4e1a536612cd015acfb417f21938fe36..091bcec4b7955eefd32e8cb23ded98428675af7f 100644 (file)
@@ -1,7 +1,7 @@
 
 /*
  *
- * $Id: urn.cc,v 1.30 1998/05/08 21:59:49 wessels Exp $
+ * $Id: urn.cc,v 1.31 1998/05/08 23:29:32 wessels Exp $
  *
  * DEBUG: section 52    URN Parsing
  * AUTHOR: Kostas Anagnostakis
@@ -113,14 +113,8 @@ urnStart(request_t * r, StoreEntry * e)
     if (strncasecmp(strBuf(r->urlpath), "menu.", 5) == 0) {
        char *new_path = xstrdup(strBuf(r->urlpath) + 5);
        EBIT_SET(urnState->flags, URN_FORCE_MENU);
-#if OLD_CODE
-       t = xstrdup(strBuf(r->urlpath) + 5);
-       xstrncpy(r->urlpath, t, MAX_URL);
-       xfree(t);
-#else
        stringReset(&r->urlpath, new_path);
        xfree(new_path);
-#endif
     }
     if ((t = strChr(r->urlpath, ':')) != NULL) {
        strSet(r->urlpath, t, '\0');