Commit 64035591 authored by mongolito404's avatar mongolito404 Committed by mikeytown2

Issue #2450725 by pbuyle: drupal_http_request() error in status report when...

Issue #2450725 by pbuyle: drupal_http_request() error in status report when using Memcache Integration's lock
parent 08a45646
......@@ -2365,8 +2365,7 @@ function httprl_acquire_headless_lock($name, $time = 60) {
// Make sure lock exists after this process is dead.
// Remove from the global locks variable.
global $locks;
unset($locks[$name]);
unset($GLOBALS['locks'][$name]);
// Remove the lock_id reference in the database.
$lock_inc = httprl_variable_get('lock_inc', './includes/lock.inc');
......@@ -2695,9 +2694,7 @@ function httprl_lock_release($name) {
$lock_inc = httprl_variable_get('lock_inc', './includes/lock.inc');
// Core.
if ($lock_inc === './includes/lock.inc') {
global $locks;
unset($locks[$name]);
unset($GLOBALS['locks'][$name]);
if (defined('VERSION') && substr(VERSION, 0, 1) >= 7) {
db_delete('semaphore')
->condition('name', $name)
......@@ -2709,16 +2706,23 @@ function httprl_lock_release($name) {
}
// Memcache storage module.
elseif (strpos($lock_inc, '/memcache_storage/includes/lock.inc') !== FALSE) {
global $locks;
// We unset unconditionally since caller assumes lock is released anyway.
unset($locks[$name]);
unset($GLOBALS['locks'][$name]);
// Remove current lock from memcached pool.
if (MemcacheStorageAPI::get($name, 'semaphore')) {
MemcacheStorageAPI::delete($name, 'semaphore');
}
}
// Memcache Integration module.
elseif (strpos($lock_inc, '/memcache/memcache-lock.inc') !== FALSE) {
// We unset unconditionally since caller assumes lock is released anyway.
unset($GLOBALS['locks'][$name]);
if (dmemcache_get($name, 'semaphore')) {
dmemcache_delete($name, 'semaphore');
}
}
elseif (strpos($lock_inc, '/apdqc/apdqc.lock.inc') !== FALSE) {
lock_release_fuzzy($name);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment