summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--avahi-sharp/AvahiTest.cs5
-rw-r--r--avahi-sharp/Utility.cs2
2 files changed, 4 insertions, 3 deletions
diff --git a/avahi-sharp/AvahiTest.cs b/avahi-sharp/AvahiTest.cs
index 07b5396..fcec737 100644
--- a/avahi-sharp/AvahiTest.cs
+++ b/avahi-sharp/AvahiTest.cs
@@ -36,9 +36,10 @@ public class AvahiTest {
EntryGroup eg = new EntryGroup (client);
eg.StateChanged += OnEntryGroupChanged;
- eg.AddService ("foobar2", "_daap._tcp", client.DomainName,
+ eg.AddService ("foobar2", "_dingdong._tcp", client.DomainName,
444, new string[] { "foo=stuff", "bar=stuff2", "baz=stuff3" });
eg.Commit ();
+ BrowseServiceTypes ("local");
Console.WriteLine ("Press enter to quit");
Console.ReadLine ();
}
@@ -57,7 +58,7 @@ public class AvahiTest {
private static void OnDomainAdded (object o, DomainInfoArgs args)
{
Console.WriteLine ("Got domain added: " + args.Domain.Domain);
- BrowseServiceTypes (args.Domain.Domain);
+ // BrowseServiceTypes (args.Domain.Domain);
}
private static void BrowseServiceTypes (string domain)
diff --git a/avahi-sharp/Utility.cs b/avahi-sharp/Utility.cs
index b15161c..819e37c 100644
--- a/avahi-sharp/Utility.cs
+++ b/avahi-sharp/Utility.cs
@@ -65,7 +65,7 @@ namespace Avahi
if (str == null)
return null;
- return Encoding.UTF8.GetBytes (str);
+ return Encoding.UTF8.GetBytes (str + "\0"); // lame.
}
private static IntPtr StringToPtr (string str)