From: James Willcox Date: Mon, 12 Sep 2005 18:21:47 +0000 (+0000) Subject: fix some small bugs in publishing and resolving, and make uninstall work X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=4d283fbd912fbeab578447ea18c0d8f47aa5cea6;p=catta fix some small bugs in publishing and resolving, and make uninstall work git-svn-id: file:///home/lennart/svn/public/avahi/trunk@568 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- diff --git a/avahi-sharp/EntryGroup.cs b/avahi-sharp/EntryGroup.cs index 9ca996e..aa97dbd 100644 --- a/avahi-sharp/EntryGroup.cs +++ b/avahi-sharp/EntryGroup.cs @@ -68,7 +68,7 @@ namespace Avahi private static extern IntPtr avahi_string_list_new (IntPtr txt); [DllImport ("avahi-common")] - private static extern void avahi_string_list_add (IntPtr list, IntPtr txt); + private static extern IntPtr avahi_string_list_add (IntPtr list, IntPtr txt); [DllImport ("avahi-common")] private static extern void avahi_string_list_free (IntPtr list); @@ -131,7 +131,7 @@ namespace Avahi if (txt != null) { foreach (string item in txt) { IntPtr itemPtr = Utility.StringToPtr (item); - avahi_string_list_add (list, itemPtr); + list = avahi_string_list_add (list, itemPtr); Utility.Free (itemPtr); } } @@ -145,8 +145,6 @@ namespace Avahi avahi_string_list_free (list); client.CheckError (); - - Console.WriteLine ("Added service: {0}, {1}, {2}, {3}, {4}", name, type, domain, host, port); } private void OnEntryGroupCallback (IntPtr group, EntryGroupState state, IntPtr userdata) diff --git a/avahi-sharp/HostNameResolver.cs b/avahi-sharp/HostNameResolver.cs index 8b529c7..a8cf0f1 100644 --- a/avahi-sharp/HostNameResolver.cs +++ b/avahi-sharp/HostNameResolver.cs @@ -123,7 +123,7 @@ namespace Avahi IntPtr hostPtr = Utility.StringToPtr (hostname); handle = avahi_host_name_resolver_new (client.Handle, iface, proto, hostPtr, aproto, - OnHostNameResolverCallback, IntPtr.Zero); + cb, IntPtr.Zero); Utility.Free (hostPtr); } diff --git a/avahi-sharp/Makefile.am b/avahi-sharp/Makefile.am index 070b29c..d361221 100644 --- a/avahi-sharp/Makefile.am +++ b/avahi-sharp/Makefile.am @@ -41,6 +41,9 @@ $(ASSEMBLY): $(AVAHISOURCES) if HAVE_MONO all: $(ASSEMBLY) -install-data-hook: +install-data-hook: $(ASSEMBLY) $(GACUTIL) /i $(ASSEMBLY) /package avahi-sharp /gacdir $(libdir) /root $(DESTDIR)$(libdir) + +uninstall-hook: $(ASSEMBLY) + $(GACUTIL) /u avahi-sharp /package avahi-sharp /gacdir $(libdir) /root $(DESTDIR)$(libdir) endif diff --git a/avahi-sharp/ServiceResolver.cs b/avahi-sharp/ServiceResolver.cs index ef1f303..558ba53 100644 --- a/avahi-sharp/ServiceResolver.cs +++ b/avahi-sharp/ServiceResolver.cs @@ -161,6 +161,7 @@ namespace Avahi IntPtr domain, IntPtr host, IntPtr address, UInt16 port, IntPtr txt, IntPtr userdata) { + ServiceInfo info; info.NetworkInterface = iface; info.Protocol = proto;