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 331649 - prepending the port to the service type is plain wrong
prepending the port to the service type is plain wrong
Status: RESOLVED FIXED
Product: gnome-games-superseded
Classification: Deprecated
Component: general
unspecified
Other All
: Normal enhancement
: ---
Assigned To: GNOME Games maintainers
GNOME Games maintainers
Depends on:
Blocks:
 
 
Reported: 2006-02-18 08:46 UTC by Callum McKenzie
Modified: 2006-09-29 18:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The current patch which adds Avahi support (22.02 KB, patch)
2006-02-18 20:39 UTC, Daniel S. Haischt
none Details | Review
Revised patch (29.47 KB, patch)
2006-02-23 14:23 UTC, Daniel S. Haischt
committed Details | Review

Description Callum McKenzie 2006-02-18 08:46:21 UTC
See the comments in the thread starting at:

http://mail.gnome.org/archives/games-list/2006-February/msg00004.html

Daniel makes a very good point about service names.
Comment 1 Daniel S. Haischt 2006-02-18 14:41:51 UTC
There's another *real* issue. As it seems you are not de-allocating resources which you did allocate in you Bonjour/Howl related code. Example:

(1) sw_discovery_publish(...);
(2) sw_discovery_run(session);
(3) sw_discovery_fina(session);

as it seems step (2) and (3) is missing in games-network.c.
see: http://www.porchdogsoft.com/products/howl/docs/index.html

(1) DNSServiceRegister(sdRef, ...);
(2) DNSServiceProcessResult(...);
(3) DNSServiceRefDeallocate(sdRef);

it seems step (2) and (3) is missing here as well.
see: http://developer.apple.com/documentation/Networking/Conceptual/dns_discovery_api/Articles/registering.html

Cheers
Daniel S. Haischt
Comment 2 Daniel S. Haischt 2006-02-18 20:39:35 UTC
Created attachment 59667 [details] [review]
The current patch which adds Avahi support

At the time I do have an issue where a client tries to connect to a server.
Comment 3 Daniel S. Haischt 2006-02-21 18:47:58 UTC
Another particular interesting issue is, how did u resolve 'foobar.local' addresses?

Such an address won't be resolved by a standard DNS server. Thus you have to use for axample nss_mdns which makes the local resolver, resolve such an address. If you do not use such a technique, you should transform a *.local address as it will be return by Zeroconf into an IP address.

I did not think you did consider this issue in you current code.

Cheers
Daniel S. Haischt
Comment 4 Daniel S. Haischt 2006-02-23 14:23:15 UTC
Created attachment 60003 [details] [review]
Revised patch

This patch adds a method called 'games_zeroconf_teardown()' which tries to de-allocate resources related to Zerconf networking. Additionally I did try to fix some Bonjour/Howl issues. Tho, I did only test gainst Avahi for now. Additionally in the games-network-dialog.c file I changed the varaible 'server' to 'lan_server' to enable people to play Zeroconf based LAN games.
Comment 5 Callum McKenzie 2006-03-17 09:56:27 UTC
I've had a look over the patch and put it in CVS. Things aren't working quite right for me yet, but I'm not certain that I've got my avahi setup correct.

I've also changed the autoconf stuff to make Avahi the default (since Avahi is better supported by the rest of GNOME than either Howl or Bonjour).

Comment 6 Daniel S. Haischt 2006-03-17 20:09:28 UTC
It would help if you could post what is not working for you.
Comment 7 Callum McKenzie 2006-03-17 21:37:02 UTC
The symptom is that I can tell one instance of iagno to creat a local game - and it appears to succeed - but a second instance of iagno can't find that game. The most likely cause of this is my system - which hasn't had its zeroconf support seriously tested since I upgraded to an Ubuntu Dapper beta. However, given the choice between hunting simple things like this down and going to bed, I went to bed. I didn't give details since I didn't want you running off on a wild goose chase.

I'll be looking into it later today.
Comment 8 Jason Clinton 2006-07-19 03:11:26 UTC
My Avahi is configured correctly and I use it frequently with Rhythmbox and Epiphany; I have tested this on my local network between three different systems (Debian Etch, Unstable and Novell SLED 10) and also on loopback and everything is working correctly. Closing. Feel free to reopen it, Callum.
Comment 9 Callum McKenzie 2006-07-19 06:57:29 UTC
I'm re-opening because none of those patches and comments actually fixed the problem in the title of the bug :). They were mostly about getting Avahi support working(and I got my Avahi support fixed and it all works).

The fix is straight-forward, but requires an ABI change, i.e. if we fix this bug then old and new versions of the games can't play against each other. This bug was here to remind me that when we finally did break the protocol (which should hapen anyway, at the very least to get versioning information into it) to change the service type.
Comment 10 Andreas Røsdal 2006-07-20 19:44:51 UTC
The port is prepended to the service type, so that the different games (iagno and gnibbles) which use different ports, will not be able to detect each other using Howl. 

The service type can be whatever you like, and is used to uniquely identify the service type, if I recall correctly from the Howl documentation. I'm not able to find this documentation now, since Howl is no longer actively developed by Porchdog Software: http://www.porchdogsoft.com/products/howl/
Comment 11 Daniel S. Haischt 2006-07-20 21:31:17 UTC
Andreas,

are you proposing to stick with the old, completely wrong naming scheme?

If you want to differentiate different games from each other, prepend something like _gnibbles.

The following proposal is from Apple's BonjourPrinting doc:

Service Instance Name = <instance> . <service> . <domain>

If you apply this scheme you'll get something like the following example:

My Gnibbles Game._gnomegames._udp.local.     Port 4711
My 2nd Gnibbles Game._gnomegames._udp.local. Port 4712 
My Iagno Game._gnomegames._udp.local.        Port 4713

If you realy need to publish a flag that differentiates the different game types you could publish a TXT record type=gnibbles ...
Comment 12 Andreas Røsdal 2006-09-29 18:53:20 UTC
Closing bug, because the code does not exist in CVS anymore.