diff options
author | Owen Fraser-Green <owen@discobabe.net> | 2004-04-03 22:00:40 +0000 |
---|---|---|
committer | John Palmieri <johnp@remedyz.boston.redhat.com> | 2006-06-28 08:15:36 -0400 |
commit | 0f65517b7a068135eb6672131ed4071c1bcf85f1 (patch) | |
tree | fa49450f048aaddf29f0f241a23d340b24352dae | |
parent | 3d11f2cdcbe6b5619c8998bae7bea6e4af4031f0 (diff) |
Made proxy DLL names unique
-rw-r--r-- | mono/Connection.cs | 15 | ||||
-rw-r--r-- | mono/Handler.cs | 2 | ||||
-rw-r--r-- | mono/Service.cs | 2 |
3 files changed, 10 insertions, 9 deletions
diff --git a/mono/Connection.cs b/mono/Connection.cs index 1fa7b70..221a3b3 100644 --- a/mono/Connection.cs +++ b/mono/Connection.cs @@ -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
diff --git a/mono/Handler.cs b/mono/Handler.cs index be03dc5..000a788 100644 --- a/mono/Handler.cs +++ b/mono/Handler.cs @@ -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)); diff --git a/mono/Service.cs b/mono/Service.cs index c34ba3d..5dea311 100644 --- a/mono/Service.cs +++ b/mono/Service.cs @@ -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; |