com php-src: Merge branch 'PHP-5.6': ext/opcache/zend_acceler ator_module.c

From: Date: Wed, 01 Apr 2015 16:04:30 +0000
Subject: com php-src: Merge branch 'PHP-5.6': ext/opcache/zend_acceler ator_module.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-86043@lists.php.net to get a copy of this message
Commit: ed43b7a5487c7ea245ae5b7ecd4f0a4f349e1b3b Author: Xinchen Hui <laruence@php.net> Thu, 2 Apr 2015 00:04:30 +0800 Parents: 3b8b1435ad832e162a2a3a2009a548e833ebb99a 9433b33ac142502bd7e8a1210d6a0770c5317800 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ed43b7a5487c7ea245ae5b7ecd4f0a4f349e1b3b Log: Merge branch 'PHP-5.6' Conflicts: ext/opcache/zend_accelerator_module.c Changed paths: MM ext/opcache/zend_accelerator_module.c Diff: diff --cc ext/opcache/zend_accelerator_module.c index 8ff1460,f7715a2..b79816b --- a/ext/opcache/zend_accelerator_module.c +++ b/ext/opcache/zend_accelerator_module.c @@@ -282,18 -314,26 +282,22 @@@ static int filename_is_in_cache(zend_st { char *key; int key_length; - zend_file_handle handle = {0}; - zend_persistent_script *persistent_script; - handle.filename = filename; - handle.type = ZEND_HANDLE_FILENAME; + key = accel_make_persistent_key(filename->val, filename->len, &key_length); + if (key != NULL) { + zend_persistent_script *persistent_script = zend_accel_hash_str_find(&ZCSG(hash), key, key_length); + if (persistent_script && !persistent_script->corrupted) { + zend_file_handle handle = {{0}, NULL, NULL, 0, 0}; - if (IS_ABSOLUTE_PATH(filename, filename_len)) { - persistent_script = zend_accel_hash_find(&ZCSG(hash), filename, filename_len + 1); - if (persistent_script) { - return !persistent_script->corrupted && - (!ZCG(accel_directives).validate_timestamps || - validate_timestamp_and_record(persistent_script, &handle TSRMLS_CC) == SUCCESS); - } - } + handle.filename = filename->val; + handle.type = ZEND_HANDLE_FILENAME; - return validate_timestamp_and_record(persistent_script, &handle) == SUCCESS; - if ((key = accel_make_persistent_key_ex(&handle, filename_len, &key_length TSRMLS_CC)) != NULL) { - persistent_script = zend_accel_hash_find(&ZCSG(hash), key, key_length + 1); - return persistent_script && !persistent_script->corrupted && - (!ZCG(accel_directives).validate_timestamps || - validate_timestamp_and_record(persistent_script, &handle TSRMLS_CC) == SUCCESS); ++ if (ZCG(accel_directives).validate_timestamps) { ++ return validate_timestamp_and_record(persistent_script, &handle) == SUCCESS; ++ } ++ ++ return 1; + } } return 0;

« previous php.cvs (#86043) next »