comparison libpurple/proxy.c @ 22412:04b807c8b98d

Bring back the lines that free info.whatever on subsequent calls to purple_gnome_proxy_get_info(). Stu pointed out that they ARE needed because 'info' is a static variable. I should have merged these back into the function when I disapproved of d5ef30aafa0c0ecff773017ab7ac542f9ba7b4b4, but holy cow that was a crazy 3-way merge.
author Mark Doliner <mark@kingant.net>
date Wed, 05 Mar 2008 18:17:25 +0000
parents 7ba68075beea
children 3225c99785b8
comparison
equal deleted inserted replaced
22411:7ba68075beea 22412:04b807c8b98d
238 238
239 g_free(tmp); 239 g_free(tmp);
240 240
241 /* If we get this far then we know we're using an HTTP proxy */ 241 /* If we get this far then we know we're using an HTTP proxy */
242 info.type = PURPLE_PROXY_HTTP; 242 info.type = PURPLE_PROXY_HTTP;
243
244 /* Free the old fields */
245 if (info.host) {
246 g_free(info.host);
247 info.host = NULL;
248 }
249 if (info.username) {
250 g_free(info.username);
251 info.username = NULL;
252 }
253 if (info.password) {
254 g_free(info.password);
255 info.password = NULL;
256 }
243 257
244 if (!g_spawn_command_line_sync("gconftool-2 -g /system/http_proxy/host", 258 if (!g_spawn_command_line_sync("gconftool-2 -g /system/http_proxy/host",
245 &info.host, NULL, NULL, NULL)) 259 &info.host, NULL, NULL, NULL))
246 return purple_global_proxy_get_info(); 260 return purple_global_proxy_get_info();
247 g_strchomp(info.host); 261 g_strchomp(info.host);