瀏覽代碼

Mutex instrumentation for troubleshooting...

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3595 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 10 年之前
父節點
當前提交
2ea54b8644
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      core/mutex.class.inc.php

+ 5 - 1
core/mutex.class.inc.php

@@ -131,7 +131,11 @@ class iTopMutex
 			$this->bLocked = true;
 			self::$aAcquiredLocks[$this->sName]++;
 		}
-		return ($res === '1');
+		if (($res !== '1') && ($res !== '0'))
+		{
+			IssueLog::Error('GET_LOCK('.$this->sName.', 0) returned: '.var_export($res, true).'. Expected values are: 0, 1 or null !!');
+		}
+		return ($res !== '0');
 	}
 
 	/**