GNOME Bugzilla – Bug 330679
Epiphany only supports HTTP Local bookmarks (zeroconf)
Last modified: 2006-05-14 19:39:41 UTC
That bug has been described on https://launchpad.net/distros/ubuntu/+source/epiphany-browser/+bug/29893 "Currently, Epiphany only supports HTTP Local bookmarks. Local bookmarks are bookmarks discovered by DNS-SD. I've created a patch that enables Epiphany to also use HTTPS and FTP. http://librarian.launchpad.net/1539046/epiphany_dnssd.patch This patch enables bookmarks that point to discovered HTTPS and FTP network services"
Thanks for the patch! It's a good idea to enable https and ftp shares too. Now for some problems with the patch: - it uses gchar; but ephy uses char only - get_protocol_for_service_type returns newly allocated memory, but could just as well return static strings, or even an enum type - indentation if off: epiphany uses tabs (8-spaces wide) + protocol = get_protocol_for_service_type(service->type); + if (protocol == NULL) return; - you need to use a separate browse handle for each of the supported types, here: +browse_dns_sd_service(EphyBookmarks *bookmarks, + const gchar *protocol) { + EphyBookmarksPrivate *priv = bookmarks->priv; - if (gnome_vfs_dns_sd_browse (&priv->browse_handle, - "local", "_http._tcp", + "local", protocol, (GnomeVFSDNSSDBrowseCallback) browse_cb, and then cancelling those handles on exit needs to be adapted to cancel all of them.
*** Bug 331022 has been marked as a duplicate of this bug. ***
Created attachment 59793 [details] [review] New version of the patch
Hi chpe, can you please check if the patch I submitted if fine by your coding standards?
Thanks for the new patch! You seem to have used spaces for indentation somewhere, but we use tab (8 spaces wide). + gchar *protocol; use char* The ephy_local_bookmarks_init / browse_dns_sd_service change is not correct, you're still overwriting priv->browse_handle twice. You should make priv->browse_handle an array probably.
chpe, thanks for your mentoring. I've double-checked the new patch and I think it now meets the project's coding standards. If there's anything wrong with it, let me know.
Created attachment 59965 [details] [review] new patch, it's also more easy to add supported protocols
Created attachment 59972 [details] [review] this patch fixes dns_sd discovery not starting Forgot to start dns_sd discovery in the previous patch
Created attachment 59974 [details] [review] and this one fixes the crash on exit This patch fixes Epiphany crashing on exit, a bug introduced by previous patches. Sorry...
ephy_node_remove_child (priv->keywords, priv->local) needs to be moved out of browse_dns_sd_service since this should only be done if all 3 of the browse_dns_sd_service calls fail.
hmmmm doesn't ephy_node_remove_child remove the bookmark-to-be of the list? Or does that remove the "Local" bookmarks folder?
Created attachment 60188 [details] [review] Remove Local bookmarks folder This patch removes the Local bookmarks folder only if browsing of all supported protocols fail.
*** Bug 341353 has been marked as a duplicate of this bug. ***
Adjusting the title so that I can actually find the bug if I search for zeroconf, and also mention _https._tcp so that that gets picked up by a search too
Created attachment 65238 [details] [review] new patch for cvs HEAD
Fixed in the development version. The fix will be available in the next major release. Thank you for your bug report. 2006-05-14 Christian Persch <chpe@cvs.gnome.org> * src/bookmarks/ephy-bookmarks.c: (resolve_cb), (ephy_local_bookmarks_init), (ephy_local_bookmarks_stop): Add https and ftp local bookmarks. Based on a patch by Celso Pinto, bug #330679.