Ticket #152: inode_swap.diff
| File inode_swap.diff, 1.3 KB (added by thomasb, 4 years ago) |
|---|
-
xcache-1.2.2
old new 222 222 } 223 223 assert(0); 224 224 } 225 226 /* }}} */ 227 static inline int xc_cmp_names(xc_entry_t *a, xc_entry_t *b) { 228 return memcmp(a->name.str.val, b->name.str.val, a->name.str.len + 1) == 0; 229 } 230 225 231 /* }}} */ 226 232 static xc_entry_t *xc_entry_find_dmz(xc_entry_t *xce TSRMLS_DC) /* {{{ */ 227 233 { 228 234 xc_entry_t *p; 229 235 for (p = xce->cache->entries[xce->hvalue]; p; p = p->next) { 230 236 if (xc_entry_equal_dmz(xce, p)) { 231 if (p->type == XC_TYPE_VAR || /* PHP */ p->data.php->mtime == xce->data.php->mtime) {237 if (p->type == XC_TYPE_VAR || /* PHP */ (p->data.php->mtime == xce->data.php->mtime && xc_cmp_names(p, xce))) { 232 238 p->hits ++; 233 239 p->atime = XG(request_time); 234 240 return p; … … 790 796 php->sourcesize = 0; 791 797 } 792 798 793 #ifdef HAVE_INODE 794 if (!php->inode) 795 #endif 796 { 797 /* hash on filename, let's expand it to real path */ 798 filename = expand_filepath(filename, opened_path_buffer TSRMLS_CC); 799 if (filename == NULL) { 800 return 0; 801 } 799 /* hash on filename, let's expand it to real path */ 800 filename = expand_filepath(filename, opened_path_buffer TSRMLS_CC); 801 if (filename == NULL) { 802 return 0; 802 803 } 803 804 804 805 UNISW(NOTHING, xce->name_type = IS_STRING;)

