[mythtv-commits] mythtv commit: r17342 by paulh
mythtv at cvs.mythtv.org
mythtv at cvs.mythtv.org
Sat May 17 16:52:31 UTC 2008
Author: paulh
Date: 2008-05-17 16:52:31 +0000 (Sat, 17 May 2008)
New Revision: 17342
Changeset: http://cvs.mythtv.org/trac/changeset/17342
Modified:
trunk/mythtv/programs/mythshutdown/main.cpp
Log:
Fix a possible problem with mythshutdown --lock/--unlock.
The lock/unlock commands can be nested so if lock is called twice unlock
would have to also be called twice to unlock shutdown. Each lock/unlock
requires 2 db queries one to get the setting and one to save it back again.
The problem is if two instances of mythshutdown is running the reads and
writes could overlap each other resulting in the setting getting out of
sequence.
This fixes the problem by using only one query to update the setting and also
locks the table making it impossible for two mythshutdown processes to update
the lock setting at the same time.
Refs #5269.
More information about the mythtv-commits
mailing list