summaryrefslogtreecommitdiff
path: root/libwardrobe
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@gmail.com>2008-06-23 17:05:45 +0200
committerLars-Dominik Braun <PromyLOPh@gmail.com>2008-06-23 17:05:45 +0200
commitf0bab69d9d09fb0a80091d813cc57a85fc3d8c61 (patch)
tree1b3d556dcb8549879a5f56f55a17b7b3016f0f09 /libwardrobe
parent332df81085e591c96eb84836514447a0868420f0 (diff)
downloadpianobar-windows-f0bab69d9d09fb0a80091d813cc57a85fc3d8c61.tar.gz
pianobar-windows-f0bab69d9d09fb0a80091d813cc57a85fc3d8c61.tar.bz2
pianobar-windows-f0bab69d9d09fb0a80091d813cc57a85fc3d8c61.zip
Set curl timeout to 60 seconds.
Diffstat (limited to 'libwardrobe')
-rw-r--r--libwardrobe/src/main.c3
1 files changed, 3 insertions, 0 deletions
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