[Pidgin] #935: GNOME Proxy detection doesn't work when set to "Automatic proxy configuration"

Pidgin trac at pidgin.im
Sat May 12 04:59:35 EDT 2007


#935: GNOME Proxy detection doesn't work when set to "Automatic proxy
configuration"
-----------------------+----------------------------------------------------
 Reporter:  steffen    |       Type:  defect
   Status:  new        |   Priority:  minor 
Component:  libpurple  |    Version:  2.0   
 Keywords:             |    Pending:  0     
-----------------------+----------------------------------------------------
 When the gnome proxy settings are set to "Automatic proxy configuration",
 pidgin will print a message on startup saying "Either the host name or
 port number specified for your given proxy type is invalid."
 When the proxy settings for an account are set to "global", this account
 will not be able to log in.

 The reason is that pidgin detects in purple_gnome_proxy_get_info() that I
 use a proxy, but it doesn't see that the host and port information in
 GConf is invalid.

 Probably pidgin should rely on the GConf key /system/proxy/mode instead of
 on /system/http_proxy/use_http_proxy to detect whether to use the GNOME
 proxy settings (/system/proxy/mode is set to "auto" when "Automatic proxy
 configuration"is selected).

 The following patch would fix this issue (at least for me):

 {{{
 #
 # old_revision [e09e55dc56bbd897b3232ae6563115772bf481b8]
 #
 # patch "libpurple/proxy.c"
 #  from [7185d3d40f0142a861c0dd49299b0ef2f26adfa4]
 #    to [fcb69a644f5fe05dc4cb19ec1bc6a8134f7bbe2f]
 #
 ============================================================
 --- libpurple/proxy.c   7185d3d40f0142a861c0dd49299b0ef2f26adfa4
 +++ libpurple/proxy.c   fcb69a644f5fe05dc4cb19ec1bc6a8134f7bbe2f
 @@ -217,14 +217,14 @@ purple_gnome_proxy_get_info(void)
                 g_free(path);

                 /* See whether to use a proxy. */
 -               if (!g_spawn_command_line_sync("gconftool-2 -g
 /system/http_proxy/use_http_proxy", &tmp,
 +               if (!g_spawn_command_line_sync("gconftool-2 -g
 /system/proxy/mode", &tmp,
                                                NULL, NULL, NULL))
                         return purple_global_proxy_get_info();
 -               if (!strcmp(tmp, "false\n")) {
 +               if (!strcmp(tmp, "none\n")) {
                         info.type = PURPLE_PROXY_NONE;
                         g_free(tmp);
                         return &info;
 -               } else if (strcmp(tmp, "true\n")) {
 +               } else if (strcmp(tmp, "manual\n")) {
                         g_free(tmp);
                         return purple_global_proxy_get_info();
                 }

 }}}

-- 
Ticket URL: <http://developer.pidgin.im/ticket/935>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list