]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
timed mutex lock not working as expected, so temporarily remove it
authorMike Brady <mikebrady@eircom.net>
Fri, 9 Mar 2018 09:50:03 +0000 (09:50 +0000)
committerMike Brady <mikebrady@eircom.net>
Fri, 9 Mar 2018 09:50:03 +0000 (09:50 +0000)
dacp.c

diff --git a/dacp.c b/dacp.c
index 49f604651b0ffb75d62102b429d2b9d584a8d674..18569f9fdf1a7d0fa67c35032dfd904b51ca9aaa 100644 (file)
--- a/dacp.c
+++ b/dacp.c
@@ -126,7 +126,7 @@ int dacp_send_command(const char *command, char **body, ssize_t *bodysize) {
   // to do it.
   struct timespec mutex_wait_time;
   mutex_wait_time.tv_sec = 0;
-  mutex_wait_time.tv_nsec = 100000000; // 100 ms
+  mutex_wait_time.tv_nsec = 20000000; // 20 ms
 
   struct addrinfo hints, *res;
   int sockfd;
@@ -162,7 +162,8 @@ int dacp_send_command(const char *command, char **body, ssize_t *bodysize) {
 
     // only do this one at a time -- not sure it is necessary, but better safe than sorry
 
-    int mutex_reply = pthread_mutex_timedlock(&dacp_conversation_lock, &mutex_wait_time);
+//    int mutex_reply = pthread_mutex_timedlock(&dacp_conversation_lock, &mutex_wait_time);
+    int mutex_reply = pthread_mutex_lock(&dacp_conversation_lock);
     if (mutex_reply == 0) {
 
       // make a socket: