summaryrefslogtreecommitdiffstats
path: root/avahi-sharp/ServiceTypeBrowser.cs
diff options
context:
space:
mode:
authorJames Willcox <snopr@snorp.net>2005-11-17 21:11:13 +0000
committerJames Willcox <snopr@snorp.net>2005-11-17 21:11:13 +0000
commit9a589e1f5221d1bd995b6c4fa73e3a074d4c2da4 (patch)
tree10b4bf2a914fa421474e6e895331d3cb4b07c9d9 /avahi-sharp/ServiceTypeBrowser.cs
parent84e07c25895dd6a8f706499a867afa44b9444ce2 (diff)
* add byte[] overloads for EntryGroup methods
* cleanup string marshalling git-svn-id: file:///home/lennart/svn/public/avahi/trunk@999 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-sharp/ServiceTypeBrowser.cs')
-rw-r--r--avahi-sharp/ServiceTypeBrowser.cs11
1 files changed, 7 insertions, 4 deletions
diff --git a/avahi-sharp/ServiceTypeBrowser.cs b/avahi-sharp/ServiceTypeBrowser.cs
index dbfff73..3796d60 100644
--- a/avahi-sharp/ServiceTypeBrowser.cs
+++ b/avahi-sharp/ServiceTypeBrowser.cs
@@ -22,6 +22,7 @@
using System;
using System.Collections;
using System.Runtime.InteropServices;
+using System.Text;
namespace Avahi
{
@@ -71,7 +72,7 @@ namespace Avahi
[DllImport ("avahi-client")]
private static extern IntPtr avahi_service_type_browser_new (IntPtr client, int iface, int proto,
- IntPtr domain, LookupFlags flags,
+ byte[] domain, LookupFlags flags,
ServiceTypeBrowserCallback cb,
IntPtr userdata);
@@ -143,10 +144,12 @@ namespace Avahi
return;
lock (client) {
- IntPtr domainPtr = Utility.StringToPtr (domain);
- handle = avahi_service_type_browser_new (client.Handle, iface, (int) proto, domainPtr, flags,
+ handle = avahi_service_type_browser_new (client.Handle, iface, (int) proto,
+ Utility.StringToBytes (domain), flags,
cb, IntPtr.Zero);
- Utility.Free (domainPtr);
+
+ if (handle == IntPtr.Zero)
+ client.ThrowError ();
}
}