s3-g_lock: Make g_lock_lock more robust
authorVolker Lendecke <vl@samba.org>
Fri, 10 Aug 2012 15:00:38 +0000 (17:00 +0200)
committerChristian Ambach <ambi@samba.org>
Thu, 16 Aug 2012 17:44:00 +0000 (19:44 +0200)
commitcbe25105c7fc51b178bf4df217812ccf48c472a1
tree9cd3fca093501e81fdfb4a767b4d8dad05bdd323
parentb83cd05ce1ff3357428cbc789ac4dbd08aa706ec
s3-g_lock: Make g_lock_lock more robust

If for some reason the cleanup of dbwrap_watch_send does not work
properly, we might starve indefinitely. Make the lock routine more
robust by retrying every 5-10 seconds. g_lock_trylock will clean up
orphaned entries.

Signed-off-by: Christian Ambach <ambi@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Thu Aug 16 19:44:00 CEST 2012 on sn-devel-104
source3/lib/g_lock.c