Changeset 957 for trunk/xcache.c
- Timestamp:
- 2012-07-07T05:40:06+02:00 (11 months ago)
- File:
-
- 1 edited
-
trunk/xcache.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/xcache.c
r956 r957 746 746 /* }}} */ 747 747 748 static zend_op_array *xc_entry_install(xc_entry_php_t *entry_php , zend_file_handle *hTSRMLS_DC) /* {{{ */748 static zend_op_array *xc_entry_install(xc_entry_php_t *entry_php TSRMLS_DC) /* {{{ */ 749 749 { 750 750 zend_uint i; … … 818 818 zend_hash_add(&EG(included_files), entry_php->entry.name.str.val, entry_php->entry.name.str.len+1, (void *)&i, sizeof(int), NULL); 819 819 #endif 820 if (h) {821 zend_llist_add_element(&CG(open_files), h);822 }823 820 824 821 #ifndef ZEND_ENGINE_2 … … 1845 1842 } 1846 1843 /* }}} */ 1847 static zend_op_array *xc_compile_restore(xc_entry_php_t *stored_entry, xc_entry_data_php_t *stored_php , zend_file_handle *hTSRMLS_DC) /* {{{ */1844 static zend_op_array *xc_compile_restore(xc_entry_php_t *stored_entry, xc_entry_data_php_t *stored_php TSRMLS_DC) /* {{{ */ 1848 1845 { 1849 1846 zend_op_array *op_array; … … 1865 1862 catched = 0; 1866 1863 zend_try { 1867 op_array = xc_entry_install(&restored_entry , hTSRMLS_CC);1864 op_array = xc_entry_install(&restored_entry TSRMLS_CC); 1868 1865 } zend_catch { 1869 1866 catched = 1; … … 1978 1975 1979 1976 if (stored_entry) { 1977 sandboxed_compiler->stored_entry = stored_entry; 1978 sandboxed_compiler->stored_php = stored_php; 1979 /* discard newly compiled result, restore from stored one */ 1980 1980 if (compiler->new_php.op_array) { 1981 1981 #ifdef ZEND_ENGINE_2 … … 1986 1986 efree(compiler->new_php.op_array); 1987 1987 compiler->new_php.op_array = NULL; 1988 sandboxed_compiler->h = NULL; 1989 } 1990 sandboxed_compiler->stored_entry = stored_entry; 1991 sandboxed_compiler->stored_php = stored_php; 1992 /* sandbox no install */ 1988 } 1993 1989 return NULL; 1994 1990 } 1995 1991 else { 1996 /* install it with sandbox */1997 1992 return compiler->new_php.op_array; 1998 1993 } … … 2123 2118 /* found entry */ 2124 2119 if (stored_entry && stored_php) { 2125 return xc_compile_restore(stored_entry, stored_php, NULL /* h */ TSRMLS_CC); 2120 zend_llist_add_element(&CG(open_files), h); 2121 return xc_compile_restore(stored_entry, stored_php TSRMLS_CC); 2126 2122 } 2127 2123 … … 2139 2135 op_array = xc_sandbox(xc_compile_file_sandboxed, (void *) &sandboxed_compiler, h->opened_path ? h->opened_path : h->filename TSRMLS_CC); 2140 2136 if (sandboxed_compiler.stored_entry) { 2141 return xc_compile_restore(sandboxed_compiler.stored_entry, sandboxed_compiler.stored_php , sandboxed_compiler.hTSRMLS_CC);2137 return xc_compile_restore(sandboxed_compiler.stored_entry, sandboxed_compiler.stored_php TSRMLS_CC); 2142 2138 } 2143 2139 else { … … 2166 2162 #endif 2167 2163 ) { 2168 op_array = old_compile_file(h, type TSRMLS_CC);2169 2164 TRACE("%s", "cacher not enabled"); 2170 return o p_array;2165 return old_compile_file(h, type TSRMLS_CC); 2171 2166 } 2172 2167
Note: See TracChangeset
for help on using the changeset viewer.

