session server UPDATE no timeout for queue lock
Prefer infinite wait on problems, if the lock
is not acquired it most likely means a fatal
error anyway.
diff --git a/src/session_server.c b/src/session_server.c
index 8b7d1f4..cbeb924 100644
--- a/src/session_server.c
+++ b/src/session_server.c
@@ -1021,10 +1021,8 @@
int ret;
struct timespec ts;
- nc_timeouttime_get(&ts, NC_PS_LOCK_TIMEOUT);
-
/* LOCK */
- ret = pthread_mutex_clocklock(&ps->lock, COMPAT_CLOCK_ID, &ts);
+ ret = pthread_mutex_lock(&ps->lock);
if (ret) {
ERR(NULL, "%s: failed to lock a pollsession (%s).", func, strerror(ret));
return -1;
@@ -1075,12 +1073,9 @@
nc_ps_unlock(struct nc_pollsession *ps, uint8_t id, const char *func)
{
int ret;
- struct timespec ts;
-
- nc_timeouttime_get(&ts, NC_PS_LOCK_TIMEOUT);
/* LOCK */
- ret = pthread_mutex_clocklock(&ps->lock, COMPAT_CLOCK_ID, &ts);
+ ret = pthread_mutex_lock(&ps->lock);
if (ret) {
ERR(NULL, "%s: failed to lock a pollsession (%s).", func, strerror(ret));
ret = -1;