[Mono-bugs] [Bug 622633] Bonjour ProviderFactory environment-variable delimiter is Unix-only

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Jul 15 11:05:56 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=622633

http://bugzilla.novell.com/show_bug.cgi?id=622633#c1


--- Comment #1 from Håvard Sørbø <havard at hsorbo.no> 2010-07-15 15:05:55 UTC ---
Patch:
diff --git a/Mono.Zeroconf/Mono.Zeroconf.Providers/ProviderFactory.cs
b/Mono.Zeroconf/Mono.Zeroconf.Providers/ProviderFactory.cs
--- a/Mono.Zeroconf/Mono.Zeroconf.Providers/ProviderFactory.cs
+++ b/Mono.Zeroconf/Mono.Zeroconf.Providers/ProviderFactory.cs
@@ -54,18 +54,22 @@
         }

         private static IZeroconfProvider [] GetProviders()
-        {
+        {

             if(providers != null) {
                 return providers;
             }

             List<IZeroconfProvider> providers_list = new
List<IZeroconfProvider>();
             List<string> directories = new List<string>();
-            Assembly asm = Assembly.GetExecutingAssembly();
-            
+            Assembly asm = Assembly.GetExecutingAssembly();

+

+            char path_delimiter = (

+                Environment.OSVersion.Platform == PlatformID.Unix || 

+                Environment.OSVersion.Platform == PlatformID.MacOSX) ? ':' :
';';

+

             string env_path =
Environment.GetEnvironmentVariable("MONO_ZEROCONF_PROVIDERS");
             if(!String.IsNullOrEmpty(env_path)) {
-                foreach(string path in env_path.Split(':')) {
+                foreach(string path in env_path.Split(path_delimiter)) {
                     if(Directory.Exists(path)) {
                         directories.Add(path);
                     }

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list