1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
diff -Naur grip-3.2.0/src/discdb.c grip-3.2.0-patched/src/discdb.c
--- grip-3.2.0/src/discdb.c 2004-04-15 12:23:37.000000000 -0600
+++ grip-3.2.0-patched/src/discdb.c 2004-11-09 15:22:15.000000000 -0700
@@ -187,17 +187,14 @@
g_string_sprintf(proxy,"%s:%d",server->proxy->name,
server->proxy->port);
- curl_easy_setopt(curl_handle,CURLOPT_PROXY,proxy);
-
- g_string_free(proxy,TRUE);
+ curl_easy_setopt(curl_handle,CURLOPT_PROXY,proxy->str);
if(*server->proxy->username) {
+ user=g_string_new(NULL);
g_string_sprintf(user,"%s:%s",server->proxy->username,
server->proxy->pswd);
- curl_easy_setopt(curl_handle,CURLOPT_PROXYUSERPWD,user);
-
- g_string_free(user,TRUE);
+ curl_easy_setopt(curl_handle,CURLOPT_PROXYUSERPWD,user->str);
}
}
@@ -238,11 +235,17 @@
fclose(outfile);
}
- g_string_free(uri,TRUE);
-
curl_slist_free_all(headers);
curl_easy_cleanup(curl_handle);
+
+ g_string_free(uri,TRUE);
+ if(server->use_proxy) {
+ g_string_free(proxy,TRUE);
+ if(*server->proxy->username) {
+ g_string_free(user,TRUE);
+ }
+ }
}
curl_global_cleanup();
|