Attached you will find an updated version of my patch.
Please tell me if you can't view the patch for some
reason...

Daniel S. Haischt schrieb:
Hello,

attached you will find a new version of the patch.

Lennart Poettering schrieb:

Threads? The gnome games use thread? Why's that?

forget about that.

Some issues:

When the entry group enters AVAHI_ENTRY_GROUP_FAILURE state you free
the glib main loop adapater, but don't free the AvahiClient
object. Thus, AvahiClient stills has a reference to the no longer
existant AvahiGlibPoll object. This is a memory corruption bug. Same
is true when when entering the fail label in create_services() and
similarly in client_callback(), ganmes_browse().

fixed.

What is this?
mtype = g_strdup_printf ("_%s%s", game_port, NETWORK_ZEROCONF_TYPE);

That particular code orginiates from what was in gnome-games before
I did change anything (i.e. the Bonjour/Howl impl are doing the
same). Hence I did just re-use their code.

The service type is a concatination of the port number and a string?
This looks very suspicous to me!

yea, maybe but it was already in there...

It's a good idea to inform the user about the exact cause why an
operation failed. Use avahi_strerror(avahi_client_errno(client)) to
get a human readable string.

I did enhance the error messages. Tho, there's little space on the GTK
dialog, which may lead to the fact that long messages will be trunkated.

The last NULL in your avahi_entry_group_add_service() call is
superfluous and passing "test=blah" as TXT record is probably not a
good idea in real world apps.

fixed.

You start your on main loop, and after it terminated you call
games_start_server()? That doesn't look right to me! The GLIB main
loop is run by the app itself, there shouldn't be a need to create
your own!


fixed.




------------------------------------------------------------------------

_______________________________________________
avahi mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/avahi


!DSPAM:43f3d81c502671610688996!


--
Mit freundlichen Gruessen / With kind regards
DAn.I.El S. Haischt

Spammers, please please send any mail to:
Daniel S. Haischt <[EMAIL PROTECTED]>

Want a complete signature??? Type at a shell prompt:
$ > finger -l [EMAIL PROTECTED]

Attachment: gnome-games-avahi.diff.bz2
Description: Binary data

_______________________________________________
avahi mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/avahi

Reply via email to