This fixes <http://bugs.xmms2.org/view.php?id=2546>

Erik Massop noted:

  In unix systems, CURLOPT_NOSIGNAL need to be used if you're using the
  default resolver, as it will use signals to time-out otherwise and
  signals and threads don't mix.

  But ideally, you switch to using the c-ares resolver then to get
  proper timeouts even without signals.

...which he quoted from:

  
http://sourceforge.net/tracker/index.php?func=detail&aid=2781096&group_id=976&atid=100976

Signed-off-by: Frank Terbeck <f...@bewatermyfriend.org>
---
 src/xmms2-scrobbler.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/xmms2-scrobbler.c b/src/xmms2-scrobbler.c
index 244fccb..a19eca2 100644
--- a/src/xmms2-scrobbler.c
+++ b/src/xmms2-scrobbler.c
@@ -317,6 +317,7 @@ do_handshake (Server *server)
 
        set_proxy (server, curl);
 
+       curl_easy_setopt (curl, CURLOPT_NOSIGNAL, 1);
        curl_easy_setopt (curl, CURLOPT_URL, post_data);
        curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION,
                          handle_handshake_reponse);
@@ -400,6 +401,7 @@ curl_thread (void *arg)
 
                set_proxy (server, curl);
 
+               curl_easy_setopt (curl, CURLOPT_NOSIGNAL, 1);
                curl_easy_setopt (curl, CURLOPT_POST, 1);
                curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION,
                                  handle_submission_reponse);
-- 
1.8.2.rc1


--
_______________________________________________
Xmms2-devel mailing list
Xmms2-devel@lists.xmms2.org
http://lists.xmms2.org/cgi-bin/mailman/listinfo/xmms2-devel

Reply via email to