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 791334 - gbinding.c:898: The target object of type GNetworkAddress has no property called 'proxy-resolver'
gbinding.c:898: The target object of type GNetworkAddress has no property cal...
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
2.54.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks: 791280 792153
 
 
Reported: 2017-12-07 10:41 UTC by Milan Crha
Modified: 2018-01-03 08:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
docs: Split GSocketConnectable/GProxyAddressEnumerator documentation (3.24 KB, patch)
2017-12-12 11:43 UTC, Philip Withnall
committed Details | Review

Description Milan Crha 2017-12-07 10:41:19 UTC
Despite the documentation of GSocketConnectable::proxy-resolver property:
https://developer.gnome.org/gio/stable/GSocketConnectable.html
this property is not available, even it's claimed to be there since 2.36.

I thought that it was meant to be able to use proxy resolver when using GNetworkMonitor to determine whether the server is reachable.

Looking more closely into it, the documentation is partially wrong and causing confusion. The whole section is called GSocketConnectable, and it shows some properties just like any other object/interface, but the "proxy-resolver" properly is listed for GProxyAddressEnumerator, not for GSocketConnectable, which is not obvious.

Thus, please, correct the documentation.

By the way, how am I supposed to use this GProxyAddressEnumerator::proxy-resolver in connection with g_network_monitor_can_reach(), which I usually get from g_network_monitor_get_default(), but even if not, then it can be used by multiple addresses (and eventually also multiple threads) at the same time, where different proxies (or none) might be needed for those different addresses?
Comment 1 Dan Winship 2017-12-07 14:42:19 UTC
Yeah, it looks like glib/docs/reference/gio/gio-sections.txt is mixing together the GSocketConnectable and GProxyAddressEnumerator docs for some reason...

> By the way, how am I supposed to use this
> GProxyAddressEnumerator::proxy-resolver in connection with
> g_network_monitor_can_reach()

There doesn't seem to be a way to use a proxy resolver other than the default one with GNetworkMonitor.
Comment 2 Philip Withnall 2017-12-12 11:43:53 UTC
Created attachment 365423 [details] [review]
docs: Split GSocketConnectable/GProxyAddressEnumerator documentation

Putting them in the same section causes gtk-doc to mix their properties
together in a single listing, which is confusing.

Since having them in a single section doesn’t really add anything, split
them out to one class per section.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Comment 3 Philip Withnall 2017-12-12 11:53:36 UTC
(In reply to Dan Winship from comment #1)
> > By the way, how am I supposed to use this
> > GProxyAddressEnumerator::proxy-resolver in connection with
> > g_network_monitor_can_reach()
> 
> There doesn't seem to be a way to use a proxy resolver other than the
> default one with GNetworkMonitor.

Looks like we might need to add a GNetworkMonitorBase:proxy-resolver property, which sets that proxy resolver on the proxy enumerator coming from g_socket_connectable_proxy_enumerate() in can_reach().
Comment 4 Dan Winship 2017-12-12 15:26:14 UTC
Comment on attachment 365423 [details] [review]
docs: Split GSocketConnectable/GProxyAddressEnumerator documentation

looks right to me but I didn't actually check that it fixes things
Comment 5 Philip Withnall 2017-12-13 13:10:38 UTC
(In reply to Dan Winship from comment #4)
> Comment on attachment 365423 [details] [review] [review]
> docs: Split GSocketConnectable/GProxyAddressEnumerator documentation
> 
> looks right to me but I didn't actually check that it fixes things

I just did. It does.
Comment 6 Philip Withnall 2017-12-13 13:13:50 UTC
Pushed to master, and I’ll backport to 2.54 shortly.

Milan, if you want to come up with a patch to fix your other issue about custom proxy resolvers not being usable with GNetworkMonitor, please file a separate bug report and attach it there (let's keep one bug report per issue). I'll be happy to review it. Thanks.

Attachment 365423 [details] pushed as 12fa92d - docs: Split GSocketConnectable/GProxyAddressEnumerator documentation
Comment 7 Philip Withnall 2017-12-13 13:15:10 UTC
Pushed to glib-2-54 as:

08a813893 (HEAD -> glib-2-54, origin/glib-2-54) docs: Split GSocketConnectable/GProxyAddressEnumerator documentation