GNOME Bugzilla – Bug 312953
Bonjour support
Last modified: 2006-08-31 19:54:01 UTC
I've written a patch to support Apple's zeroconf implementation, Bonjour, in addition to Howl. It adds the following configure options: --enable-bonjour --with-bonjour-includes --with-bonjour-libs Howl remains the default, and if both are present on the system, you have to --disable-howl and --enable-bonjour to use the Bonjour implementation. Patch is against HEAD.
Created attachment 50424 [details] [review] Adds Bonjour support.
thanks for the great patch! however, I have a small request. Do you think it is possible for you to separate HOWL and BONJOUR support in 2 separate files? (I would create a gm-remote-contacts-bonjour.cpp file) The reason for this is to make the code easier to read. Moreover, another person is working on AVAHI-based zeroconf support, so that would be better. Thanks,
I could separate the code (gm_contacts-zeroconf-bonjour.cpp and .h, zeroconf_publisher-bonjour.cpp and .h), however there would be a couple of hundred lines of duplicated code, which would have to be changed in both places if you want to change it later. It's your call, though. The reason I want Bonjour support is that being Apple's, it may get more QA and security scrutiny than Howl, and KDE already uses it. This makes it easier to maintain a distribution where both GNOME and KDE are installed. I've submitted a similar patch for gnome-vfs. See bug 311882.
OK, nice justification. I'll examine your patch and commit it in the OPAL branch of CVS later this month. Thanks!
Created attachment 52899 [details] [review] Updated patch for bonjour support This updated patch has been provided by Sébastien Estienne the 20050929, so it could apply to a more recent cvs (opal branch). I made the following remarks about it ; which should probably be answered by the original author : * lib/contacts/gm_contacts-zeroconf.cpp, it removes #undef to add # undef instead... it isn't part of the feature-adding patch ; * lib/contacts/gm_contacts-zeroconf.cpp, in GMZeroconfBrowser::Start, in case of bonjour there is an unconditional Browse+Resume, otherwise it is just Resume, and then only if discovery... is it normal ? * lib/contacts/gm_contacts-zeroconf.h: some variables are moving out of the private section of the class ; it doesn't look honest ; * src/zeroconf_publisher.cpp, in GMZeroconfPublisher::GMZeroconfPublisher, the default definitions of name and port moved upward, which is logical to make them common to both sections of code (#if bonjour and #else) ; however I wonder if we don't lose more readability than we win by making them common... perhaps that will settle when howl will be kicked out ; * src/zeroconf_publisher.cpp, I find the "check_okay" a little shocking... * src/zeroconf_publisher.cpp, in GMZeroconfPublisher::Start, if HAS_BONJOUR, then unconditional Resume ; otherwise, Resume only if discovery... is it normal ? I have to add that we discussed about the future of zeroconf in gnomemeeting among some of us (Damien, Sébastien and myself), and decided we would have bonjour+avahi ; so the plan is : 1) push avahi in (done) ; 2) push bonjour in (pending) ; 3) push howl out ; 4) clean the zeroconf code so it doesn't shows too much about the surgery. Snark on #gnomemeeting
It's been a while since I wrote the original Bonjour patch, but if the new one is tested and works, I don't see why it shouldn't go in. Long term, it might be good to keep the zeroconf backends in separate files. Note that I tested my original patch, and that worked. I don't have the time right now to test the new one - I wiped the dev environment I used back then. Sorry.
Sigh... I just hate when someone contributes something and we don't make a serious use of the help :-( Do we still care about bonjour support or has the avahi support superseded this ? I don't think I can even test a patch about this :-(
Probably best to just leave it out now, since Avahi is more mature and the platform seems to be going that way.
Ok. Still sorry to lose your contribution though. :-(