After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 729379 - Tries to use deactivated proxy
Tries to use deactivated proxy
Status: RESOLVED FIXED
Product: sound-juicer
Classification: Applications
Component: metadata
unspecified
Other All
: Normal normal
: ---
Assigned To: Sound Juicer Maintainers
Sound Juicer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-05-02 11:12 UTC by Bastien Nocera
Modified: 2014-05-07 10:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libjuicer: Add support for the "none" proxy mode (7.96 KB, patch)
2014-05-06 14:28 UTC, Bastien Nocera
reviewed Details | Review
libjuicer: Add support for the "none" proxy mode (8.45 KB, patch)
2014-05-06 21:57 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2014-05-02 11:12:13 UTC
sound-juicer-3.11.90-1.fc20.x86_64

** (sound-juicer:22555): WARNING **: No Musicbrainz metadata for discid gNB2ddg0g9OpThwo0lqBgLQoQVQ-, http code 0, Could not resolve hostname `squid.redhat.com': Host not found

$ gsettings get org.gnome.system.proxy mode
'none'

But it still tries to use the http proxy settings nonetheless.
Comment 1 Phillip Wood 2014-05-02 14:18:04 UTC
It is ignoring the mode key altogether I'll get on and fix it next week
Comment 2 Bastien Nocera 2014-05-06 14:28:27 UTC
Created attachment 275985 [details] [review]
libjuicer: Add support for the "none" proxy mode

This stops sound-juicer from using a proxy even when that one is
actually deactivated in the preferences.
Comment 3 Phillip Wood 2014-05-06 17:54:49 UTC
Review of attachment 275985 [details] [review]:

I wonder if we would be better using GProxyResolver rather than reading the proxy settings directly so we can support G_DESKTOP_PROXY_MODE_AUTO as well. The Resolver would have to be queried inside SjMetadataMusicbrainz5 rather than SjMetadata as g_proxy_resolver_lookup() needs a url. That would make the proxy properties of SjMetadata redundant. Christophe wasn't keen when I tried to move the proxy handling into SjMetadataMusicbrainz5 and remove the properties from SjMetadata before but it would be good to support the auto proxy mode.

Also we should think about what to do with the http_proxy environment variable. If it's set then libmusicbrainz uses it if we don't explicitly set a proxy. That means if a user starts sound-juicer and then sets the proxy mode to 'none' sound-juicer will still use the proxy as the http_proxy environment variable will still be set.

::: libjuicer/sj-metadata-musicbrainz5.c
@@ +809,3 @@
     mb5_query_set_proxyhost (priv->mb, NULL);
     mb5_query_set_proxyport (priv->mb, 0);
     mb5_query_set_proxyusername (priv->mb, NULL);

Need to change the else at the end of this block to 
else if (priv->proxy_mode == G_DESKTOP_PROXY_MODE_MANUAL)
to avoid using the manual proxy if the mode is G_DESKTOP_PROXY_MODE_AUTO
Comment 4 Bastien Nocera 2014-05-06 21:57:21 UTC
Created attachment 276028 [details] [review]
libjuicer: Add support for the "none" proxy mode

This stops sound-juicer from using a proxy even when that one is
actually deactivated in the preferences.
Comment 5 Bastien Nocera 2014-05-06 21:58:09 UTC
I think this is probably good enough for now, and then we can add support for the automatic mode in a separate bug.
Comment 6 Phillip Wood 2014-05-07 10:14:07 UTC
Review of attachment 276028 [details] [review]:

I've not tried compiling it but it looks good to me.
Comment 7 Phillip Wood 2014-05-07 10:21:38 UTC
(In reply to comment #5)
> I think this is probably good enough for now, and then we can add support for
> the automatic mode in a separate bug.

OK, I've opened bug 729702 for this.
Comment 8 Bastien Nocera 2014-05-07 10:27:31 UTC
Attachment 276028 [details] pushed as a7da3e8 - libjuicer: Add support for the "none" proxy mode