Diff of /trunk/src/gcvote.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 193 by harbaum, Sun Nov 8 20:32:55 2009 UTC revision 194 by harbaum, Wed Nov 18 11:40:31 2009 UTC
# Line 130  static gcvote_t *parse_doc(xmlDocPtr doc Line 130  static gcvote_t *parse_doc(xmlDocPtr doc
130  }  }
131    
132  static void curl_set_proxy(CURL *curl, proxy_t *proxy) {  static void curl_set_proxy(CURL *curl, proxy_t *proxy) {
133    if(proxy) {    if(proxy && proxy->host) {
134      if(proxy->ignore_hosts)      if(proxy->ignore_hosts)
135        printf("WARNING: Proxy \"ignore_hosts\" unsupported!\n");        printf("WARNING: Proxy \"ignore_hosts\" unsupported!\n");
136    
# Line 139  static void curl_set_proxy(CURL *curl, p Line 139  static void curl_set_proxy(CURL *curl, p
139      curl_easy_setopt(curl, CURLOPT_PROXY, proxy->host);      curl_easy_setopt(curl, CURLOPT_PROXY, proxy->host);
140      curl_easy_setopt(curl, CURLOPT_PROXYPORT, proxy->port);      curl_easy_setopt(curl, CURLOPT_PROXYPORT, proxy->port);
141    
142      if(proxy->use_authentication) {      if(proxy->use_authentication &&
143           proxy->authentication_user && proxy->authentication_password) {
144        printf("gcvote:   use auth for user %s\n", proxy->authentication_user);        printf("gcvote:   use auth for user %s\n", proxy->authentication_user);
145    
146        char *cred = g_strdup_printf("%s:%s",        char *cred = g_strdup_printf("%s:%s",
# Line 156  static void curl_set_proxy(CURL *curl, p Line 157  static void curl_set_proxy(CURL *curl, p
157  void gcvote_request_free(gcvote_request_t *request) {  void gcvote_request_free(gcvote_request_t *request) {
158    /* decrease refcount and only free structure if no references are left */    /* decrease refcount and only free structure if no references are left */
159    request->refcount--;    request->refcount--;
160    if(request->refcount) {    if(request->refcount > 0) {
161      printf("gcvote: still %d references, keeping request\n",      printf("gcvote: still %d references, keeping request\n",
162             request->refcount);             request->refcount);
163      return;      return;

Legend:
Removed from v.193  
changed lines
  Added in v.194