~ubuntu-branches/ubuntu/jaunty/avahi/jaunty-updates

« back to all changes in this revision

Viewing changes to avahi-sharp/Client.cs

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2006-07-08 01:28:13 UTC
  • mto: (4.1.1 lenny)
  • mto: This revision was merged to the branch mainline in revision 38.
  • Revision ID: james.westby@ubuntu.com-20060708012813-xc3wv6mfmw5b2wi2
Tags: upstream-0.6.11
Import upstream version 0.6.11

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: Client.cs 1177 2006-03-09 20:27:47Z snorp $ */
 
1
/* $Id: Client.cs 1216 2006-05-08 02:27:25Z snorp $ */
2
2
 
3
3
/***
4
4
  This file is part of avahi.
286
286
        public void Dispose ()
287
287
        {
288
288
            if (handle != IntPtr.Zero) {
289
 
                avahi_client_free (handle);
290
 
                avahi_simple_poll_quit (spoll);
291
 
                avahi_simple_poll_free (spoll);
292
 
                handle = IntPtr.Zero;
 
289
                lock (this) {
 
290
                    avahi_client_free (handle);
 
291
                    handle = IntPtr.Zero;
 
292
 
 
293
                    avahi_simple_poll_quit (spoll);
 
294
                    Monitor.Wait (this);
 
295
                    
 
296
                    avahi_simple_poll_free (spoll);
 
297
                }
293
298
            }
294
299
        }
295
300
 
370
375
            try {
371
376
                lock (this) {
372
377
                    avahi_simple_poll_loop (spoll);
 
378
                    Monitor.Pulse (this);
373
379
                }
374
380
            } catch (Exception e) {
375
381
                Console.Error.WriteLine ("Error in avahi-sharp event loop: " + e);