Explorar o código

Mutex instrumentation for troubleshooting...

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3595 a333f486-631f-4898-b8df-5754b55c2be0
dflaven %!s(int64=10) %!d(string=hai) anos
pai
achega
2ea54b8644
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  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');
 	}
 
 	/**