]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Made proxy DLL names unique
authorOwen Fraser-Green <owen@discobabe.net>
Sat, 3 Apr 2004 22:00:40 +0000 (22:00 +0000)
committerOwen Fraser-Green <owen@discobabe.net>
Sat, 3 Apr 2004 22:00:40 +0000 (22:00 +0000)
mono/Connection.cs
mono/Handler.cs
mono/Service.cs

index 5e25ffd668b367772c21c56a5214a5ca249b2cdb..fad0dc56dd5b839be5dae92627dd14e5494b987f 100644 (file)
@@ -64,15 +64,16 @@ namespace DBus
     internal static Connection Wrap(IntPtr rawConnection) 
     {
       if (slot > -1) {
-       // If we already have a Connection object associated with this rawConnection then return it
+       // Maybe we already have a Connection object associated with
+       // this rawConnection then return it
        IntPtr rawThis = dbus_connection_get_data (rawConnection, slot);
-       return (DBus.Connection) ((GCHandle)rawThis).Target;
-      } 
-      else 
-       {
-         // If it doesn't exist then create a new connection around it
-         return new Connection(rawConnection);
+       if (rawThis != IntPtr.Zero) {
+         return (DBus.Connection) ((GCHandle)rawThis).Target;
        }
+      }
+      
+      // If it doesn't exist then create a new connection around it
+      return new Connection(rawConnection);
     }
 
     public int Timeout
index be03dc5e910c00f8c3c9b8c9df2bc4804919134c..000a78864bd8e1ca385850c73c3eae3e71c7d6ec 100644 (file)
@@ -72,7 +72,7 @@ namespace DBus
       pathName = pathName.TrimStart('/');
       this.path = pathName.Split('/');
       this.pathName = "/" + pathName;
-
+      
       // Create the vTable and register the path
       vTable = new DBusObjectPathVTable(new DBusObjectPathUnregisterFunction(Unregister_Called), 
                                        new DBusObjectPathMessageFunction(Message_Called));
index c34ba3dcc73a0df2bcbdbbc2fbff560d8af51d51..5dea31135394ef96f2d76b25d8c399a716b4a7df 100644 (file)
@@ -167,7 +167,7 @@ namespace DBus
     {
       get {
        if (this.module == null) {
-         this.module = ProxyAssembly.DefineDynamicModule(Name, "proxy.dll", true);
+         this.module = ProxyAssembly.DefineDynamicModule(Name, Name + ".proxy.dll", true);
        }
        
        return this.module;