banshee r4284 - in trunk/banshee: . src/Extensions/Banshee.Daap/Banshee.Daap



Author: gburt
Date: Tue Jul 29 16:01:24 2008
New Revision: 4284
URL: http://svn.gnome.org/viewvc/banshee?rev=4284&view=rev

Log:
2008-07-29  Gabriel Burt  <gabriel burt gmail com>

	* src/Extensions/Banshee.Daap/Banshee.Daap/DaapService.cs: Catch
	exceptions caused by not having any DAAP backends (avahi, etc).


Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Extensions/Banshee.Daap/Banshee.Daap/DaapService.cs

Modified: trunk/banshee/src/Extensions/Banshee.Daap/Banshee.Daap/DaapService.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Daap/Banshee.Daap/DaapService.cs	(original)
+++ trunk/banshee/src/Extensions/Banshee.Daap/Banshee.Daap/DaapService.cs	Tue Jul 29 16:01:24 2008
@@ -134,19 +134,23 @@
             source_map = new Dictionary<string, DaapSource> ();
             container = new DaapContainerSource ();
             
-            // Now start looking for services.
-            // We do this after creating the source because if we do it before
-            // there's a race condition where we get a service before the source
-            // is added.
-            locator = new ServiceLocator ();
-            locator.Found += OnServiceFound;
-            locator.Removed += OnServiceRemoved;
-            locator.ShowLocalServices = true;
-            locator_started = DateTime.Now;
-            locator.Start ();
-            
-            proxy_server = new DaapProxyWebServer ();
-            proxy_server.Start ();
+            try {
+                // Now start looking for services.
+                // We do this after creating the source because if we do it before
+                // there's a race condition where we get a service before the source
+                // is added.
+                locator = new ServiceLocator ();
+                locator.Found += OnServiceFound;
+                locator.Removed += OnServiceRemoved;
+                locator.ShowLocalServices = true;
+                locator_started = DateTime.Now;
+                locator.Start ();
+                
+                proxy_server = new DaapProxyWebServer ();
+                proxy_server.Start ();
+            } catch (Exception e) {
+                Hyena.Log.Exception ("Failed to start DAAP client", e);
+            }
         }
         
         string IService.ServiceName {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]