--- trunk/src/gcvote.c 2009/11/08 20:32:55 165 +++ trunk/src/gcvote.c 2009/11/18 11:40:31 194 @@ -130,7 +130,7 @@ } static void curl_set_proxy(CURL *curl, proxy_t *proxy) { - if(proxy) { + if(proxy && proxy->host) { if(proxy->ignore_hosts) printf("WARNING: Proxy \"ignore_hosts\" unsupported!\n"); @@ -139,7 +139,8 @@ curl_easy_setopt(curl, CURLOPT_PROXY, proxy->host); curl_easy_setopt(curl, CURLOPT_PROXYPORT, proxy->port); - if(proxy->use_authentication) { + if(proxy->use_authentication && + proxy->authentication_user && proxy->authentication_password) { printf("gcvote: use auth for user %s\n", proxy->authentication_user); char *cred = g_strdup_printf("%s:%s", @@ -156,7 +157,7 @@ void gcvote_request_free(gcvote_request_t *request) { /* decrease refcount and only free structure if no references are left */ request->refcount--; - if(request->refcount) { + if(request->refcount > 0) { printf("gcvote: still %d references, keeping request\n", request->refcount); return;