Let OPTION LOCK-TIMEOUT accept -1 as a value.
commit70e1e4fbd1e3ec85f5d79d6bf297cb02d87a9ac4
authorBen Kibbey <bjk@luxsci.net>
Wed, 30 May 2012 22:57:53 +0000 (30 18:57 -0400)
committerBen Kibbey <bjk@luxsci.net>
Wed, 30 May 2012 23:26:07 +0000 (30 19:26 -0400)
tree24b550a3a8e516623c1ff3232e9a34cd1332f334
parent0346d3feac217a92d722428276122e61a32981b9
Let OPTION LOCK-TIMEOUT accept -1 as a value.

When -1, return an error immediately as RC_ON_LOCKED did. Clients and
the cache timer thread can benefit from not waiting for the mutex.

Also prevent an integer overflow by not incrementing the elapsed time
from the wait duration and restore the lock-timeout during the RESET
command.
src/cache.c
src/cache.h
src/commands.c
src/common.h
src/mutex.h
src/pwmd.c