X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-sharp%2FEntryGroup.cs;h=02be643676bebbddcfc8c75e2fa299b090795fe0;hb=cfed812fb7b60f1c62a9a9b0619a0b7f11dcda1a;hp=ab89544b4f1cc1e847bc87e8be51fbd1cc8c248e;hpb=69d2b9fee695cf2e65f1eda9c8ce66085efe2856;p=catta diff --git a/avahi-sharp/EntryGroup.cs b/avahi-sharp/EntryGroup.cs index ab89544..02be643 100644 --- a/avahi-sharp/EntryGroup.cs +++ b/avahi-sharp/EntryGroup.cs @@ -236,11 +236,15 @@ namespace Avahi private void AddService (int iface, Protocol proto, PublishFlags flags, string name, string type, string domain, string host, UInt16 port, IntPtr list) { - int ret = avahi_entry_group_add_service_strlst (handle, iface, proto, flags, + int ret; + + lock (client) { + ret = avahi_entry_group_add_service_strlst (handle, iface, proto, flags, Utility.StringToBytes (name), Utility.StringToBytes (type), Utility.StringToBytes (domain), Utility.StringToBytes (host), port, list); + } avahi_string_list_free (list);