]> git.meshlink.io Git - catta/commitdiff
actually NULL-terminate strings passed to avahi.
authorJames Willcox <snopr@snorp.net>
Sat, 7 Jan 2006 21:05:24 +0000 (21:05 +0000)
committerJames Willcox <snopr@snorp.net>
Sat, 7 Jan 2006 21:05:24 +0000 (21:05 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1064 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-sharp/AvahiTest.cs
avahi-sharp/Utility.cs

index 07b539653227025074925ef059ccd5bf6f2ac18c..fcec737fea79d0019ee5d1f86a2ada10be6517ba 100644 (file)
@@ -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)
index b15161c19b035b38edcf145581240c0fc1d46846..819e37cd9c5259c34e7004be111e741aa880e412 100644 (file)
@@ -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)