[mirrorbrain-commits] r7949 - /trunk/mod_mirrorbrain/mod_mirrorbrain.c

From: <poeml_at_mirrorbrain.org>
Date: Wed, 10 Feb 2010 02:16:01 -0000
Author: poeml
Date: Wed Feb 10 03:16:00 2010
New Revision: 7949

URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=7949&view=rev
Log:
mod_mirrorbrain:
- Backward compatibility (added in r7787) for old filename scheme
  ("*.metalink-hashes") in the metalink hash cache removed.

Modified:
    trunk/mod_mirrorbrain/mod_mirrorbrain.c

Modified: trunk/mod_mirrorbrain/mod_mirrorbrain.c
URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/mod_mirrorbrain/mod_mirrorbrain.c?rev=7949&r1=7948&r2=7949&view=diff
==============================================================================
--- trunk/mod_mirrorbrain/mod_mirrorbrain.c (original)
+++ trunk/mod_mirrorbrain/mod_mirrorbrain.c Wed Feb 10 03:16:00 2010
_at_@ -1685,7 +1685,6 @@
         apr_finfo_t sb;
         const char *hashfilename;     /* the even newer hash filename contains the size of the file */
         const char *inode_hashfilename;     /* the new hash filename contains the inode of the file */
-        const char *old_hashfilename; /* for a transition period - will be depreciated later */
         hashfilename = apr_psprintf(r->pool, "%s%s.size_%llu", 
                                    scfg->metalink_hashes_prefix ? scfg->metalink_hashes_prefix : "", 
                                    r->filename, 
_at_@ -1694,11 +1693,6 @@
                                    scfg->metalink_hashes_prefix ? scfg->metalink_hashes_prefix : "", 
                                    r->filename, 
                                    r->finfo.inode);
-        old_hashfilename = apr_pstrcat(r->pool, 
-                                   scfg->metalink_hashes_prefix ? scfg->metalink_hashes_prefix : "", 
-                                   r->filename, 
-                                   ".metalink-hashes", 
-                                   NULL);
 
         if (apr_stat(&sb, hashfilename, APR_FINFO_MIN, r->pool) == APR_SUCCESS && (sb.filetype == APR_REG)) {
             debugLog(r, cfg, "hashfile '%s' exists", hashfilename);
_at_@ -1737,26 +1731,8 @@
             } else {
                 debugLog(r, cfg, "inode_hashfile '%s' outdated, ignoring", inode_hashfilename);
             }
-        } else if (apr_stat(&sb, old_hashfilename, APR_FINFO_MIN, r->pool) == APR_SUCCESS && (sb.filetype == APR_REG)) {
-            debugLog(r, cfg, "old_hashfile '%s' exists", old_hashfilename);
-
-            if (sb.mtime >= r->finfo.mtime) {
-                debugLog(r, cfg, "old_hashfile '%s' up to date, injecting", old_hashfilename);
-
-                apr_file_t *fh;
-                rv = apr_file_open(&fh, old_hashfilename, APR_READ, APR_OS_DEFAULT, r->pool);
-                if (rv == APR_SUCCESS) {
-                    ap_send_fd(fh, r, 0, sb.size, &len);
-                    apr_file_close(fh);
-                } else {
-                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, 
-                                  "[mod_mirrorbrain] could not open old_hashfile '%s'.", old_hashfilename);
-                }
-            } else {
-                debugLog(r, cfg, "old_hashfile '%s' outdated, ignoring", old_hashfilename);
-            }
         } else {
-            debugLog(r, cfg, "no hash file found (%s, %s, %s)", hashfilename, inode_hashfilename, old_hashfilename);
+            debugLog(r, cfg, "no hash file found (%s, %s)", hashfilename, inode_hashfilename);
         } 
 
         ap_rputs(     "      <resources>\n\n", r);




_______________________________________________
mirrorbrain-commits mailing list
Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/

Note: To remove yourself from this list, send a mail with the content
 	unsubscribe
to the address mirrorbrain-commits-request_at_mirrorbrain.org
Received on Wed Feb 10 2010 - 02:16:04 GMT

This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT