Author: jwilcox
Date: 2006-01-13 18:07:10 -0500 (Fri, 13 Jan 2006)
New Revision: 55560

Modified:
   trunk/daap-sharp/ChangeLog
   trunk/daap-sharp/sample/UpdateTest.cs
   trunk/daap-sharp/src/ServiceLocator.cs
Log:
2006-01-13  James Willcox  <[EMAIL PROTECTED]>

        * src/ServiceLocator.cs (OnServiceResolved): don't fire of a 'Found'
        event if we already have it.


Modified: trunk/daap-sharp/ChangeLog
===================================================================
--- trunk/daap-sharp/ChangeLog  2006-01-13 23:05:07 UTC (rev 55559)
+++ trunk/daap-sharp/ChangeLog  2006-01-13 23:07:10 UTC (rev 55560)
@@ -1,3 +1,8 @@
+2006-01-13  James Willcox  <[EMAIL PROTECTED]>
+
+       * src/ServiceLocator.cs (OnServiceResolved): don't fire of a 'Found'
+       event if we already have it.
+
 2006-01-09  Aaron Bockover  <[EMAIL PROTECTED]>
 
        * src/ContentWriter.cs:

Modified: trunk/daap-sharp/sample/UpdateTest.cs
===================================================================
--- trunk/daap-sharp/sample/UpdateTest.cs       2006-01-13 23:05:07 UTC (rev 
55559)
+++ trunk/daap-sharp/sample/UpdateTest.cs       2006-01-13 23:07:10 UTC (rev 
55560)
@@ -31,6 +31,7 @@
                 ServiceLocator locator = new ServiceLocator ();
                 locator.Found += OnServiceFound;
                 locator.Removed += OnServiceRemoved;
+                locator.Start ();
             } else {
                 string host = args[0];
 

Modified: trunk/daap-sharp/src/ServiceLocator.cs
===================================================================
--- trunk/daap-sharp/src/ServiceLocator.cs      2006-01-13 23:05:07 UTC (rev 
55559)
+++ trunk/daap-sharp/src/ServiceLocator.cs      2006-01-13 23:07:10 UTC (rev 
55560)
@@ -134,6 +134,11 @@
             (o as ServiceResolver).Dispose ();
 
             string name = args.Service.Name;
+
+            if (services[args.Service.Name] != null) {
+                return; // we already have it somehow
+            }
+            
             bool pwRequired = false;
 
             // iTunes tacks this on to indicate a passsword protected share.  
Ugh.

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to