diff options
-rw-r--r-- | libpiano/src/main.c | 1 | ||||
-rw-r--r-- | libwardrobe/src/main.c | 3 | ||||
-rw-r--r-- | src/player.c | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/libpiano/src/main.c b/libpiano/src/main.c index 14ff4c6..aaaacf9 100644 --- a/libpiano/src/main.c +++ b/libpiano/src/main.c @@ -62,6 +62,7 @@ void PianoInit (PianoHandle_t *ph) { /* FIXME: 64-bit may make this hack useless */ snprintf (ph->routeId, sizeof (ph->routeId), "%07liP", time (NULL)>>8); curl_easy_setopt (ph->curlHandle, CURLOPT_USERAGENT, PACKAGE_STRING); + curl_easy_setopt (ph->curlHandle, CURLOPT_CONNECTTIMEOUT, 60); } /* free complete search result diff --git a/libwardrobe/src/main.c b/libwardrobe/src/main.c index 897a596..cfe9395 100644 --- a/libwardrobe/src/main.c +++ b/libwardrobe/src/main.c @@ -28,6 +28,7 @@ THE SOFTWARE. #include "wardrobe.h" #include "md5.h" +#include "config.h" #define WARDROBE_HTTP_BUFFER_SIZE 10000 @@ -105,6 +106,8 @@ void WardrobeHttpPost (CURL *ch, char *url, char *postData, char **retData) { void WardrobeInit (WardrobeHandle_t *wh) { memset (wh, 0, sizeof (*wh)); wh->ch = curl_easy_init (); + curl_easy_setopt (wh->ch, CURLOPT_USERAGENT, PACKAGE_STRING); + curl_easy_setopt (wh->ch, CURLOPT_CONNECTTIMEOUT, 60); } /* free () replacement that does some checks and zeros memory diff --git a/src/player.c b/src/player.c index 8c7ea7b..d0bc4cb 100644 --- a/src/player.c +++ b/src/player.c @@ -225,6 +225,7 @@ void *BarPlayerThread (void *data) { curl_easy_setopt (player->audioFd, CURLOPT_WRITEFUNCTION, BarPlayerCurlCb); curl_easy_setopt (player->audioFd, CURLOPT_WRITEDATA, player); curl_easy_setopt (player->audioFd, CURLOPT_USERAGENT, PACKAGE_STRING); + curl_easy_setopt (player->audioFd, CURLOPT_CONNECTTIMEOUT, 60); curl_easy_perform (player->audioFd); NeAACDecClose(player->aacHandle); |