Author: poeml Date: Wed Feb 10 03:24:40 2010 New Revision: 7950 URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=7950&view=rev Log: mod_mirrorbrain: - Backward compatibility (added in r7794) for old filename scheme ("*.inode_$INODE") 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=7950&r1=7949&r2=7950&view=diff ============================================================================== --- trunk/mod_mirrorbrain/mod_mirrorbrain.c (original) +++ trunk/mod_mirrorbrain/mod_mirrorbrain.c Wed Feb 10 03:24:40 2010 @@ -1684,15 +1684,10 @@ /* inject hashes, if they are prepared on-disk */ 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 */ hashfilename = apr_psprintf(r->pool, "%s%s.size_%llu", scfg->metalink_hashes_prefix ? scfg->metalink_hashes_prefix : "", r->filename, r->finfo.size); - inode_hashfilename = apr_psprintf(r->pool, "%s%s.inode_%lu", - scfg->metalink_hashes_prefix ? scfg->metalink_hashes_prefix : "", - r->filename, - r->finfo.inode); if (apr_stat(&sb, hashfilename, APR_FINFO_MIN, r->pool) == APR_SUCCESS && (sb.filetype == APR_REG)) { debugLog(r, cfg, "hashfile '%s' exists", hashfilename); @@ -1713,26 +1708,8 @@ debugLog(r, cfg, "hashfile '%s' outdated, ignoring", hashfilename); } - } else if (apr_stat(&sb, inode_hashfilename, APR_FINFO_MIN, r->pool) == APR_SUCCESS && (sb.filetype == APR_REG)) { - debugLog(r, cfg, "inode_hashfile '%s' exists", inode_hashfilename); - - if (sb.mtime >= r->finfo.mtime) { - debugLog(r, cfg, "inode_hashfile '%s' up to date, injecting", inode_hashfilename); - - apr_file_t *fh; - rv = apr_file_open(&fh, inode_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 inode_hashfile '%s'.", inode_hashfilename); - } - } else { - debugLog(r, cfg, "inode_hashfile '%s' outdated, ignoring", inode_hashfilename); - } } else { - debugLog(r, cfg, "no hash file found (%s, %s)", hashfilename, inode_hashfilename); + debugLog(r, cfg, "no hash file found (%s)", 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.orgReceived on Wed Feb 10 2010 - 02:24:43 GMT
This archive was generated by hypermail 2.2.0 : Wed Feb 10 2010 - 02:32:17 GMT