Commit 2229a34f authored by Etienne CHAMPETIER's avatar Etienne CHAMPETIER

ZP-792 lock on __FILE__ in filestatemachine.

Released under the Affero GNU General Public License (AGPL) version 3.

this prevent possible collision in the future
parent 00b5c301
...@@ -214,7 +214,7 @@ class FileStateMachine implements IStateMachine { ...@@ -214,7 +214,7 @@ class FileStateMachine implements IStateMachine {
* @return boolean indicating if the user was added or not (existed already) * @return boolean indicating if the user was added or not (existed already)
*/ */
public function LinkUserDevice($username, $devid) { public function LinkUserDevice($username, $devid) {
$mutex = new SimpleMutex(); $mutex = new SimpleMutex(__FILE__);
$changed = false; $changed = false;
// exclusive block // exclusive block
...@@ -258,7 +258,7 @@ class FileStateMachine implements IStateMachine { ...@@ -258,7 +258,7 @@ class FileStateMachine implements IStateMachine {
* @return boolean * @return boolean
*/ */
public function UnLinkUserDevice($username, $devid) { public function UnLinkUserDevice($username, $devid) {
$mutex = new SimpleMutex(); $mutex = new SimpleMutex(__FILE__);
$changed = false; $changed = false;
// exclusive block // exclusive block
......
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