dbus/mono Connection.cs,1.13,1.14 Message.cs,1.11,1.12
John Palmieri
johnp at kemper.freedesktop.org
Wed Apr 19 09:02:26 PDT 2006
Update of /cvs/dbus/dbus/mono
In directory kemper:/tmp/cvs-serv26732/mono
Modified Files:
Connection.cs Message.cs
Log Message:
2006-04-19 John (J5) Palmieri <johnp at redhat.com>
* mono/Connection.cs, mono/Message.cs: Check Target type
Patch from Aaron Bockover (abockover at novell.com)
Index: Connection.cs
===================================================================
RCS file: /cvs/dbus/dbus/mono/Connection.cs,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- Connection.cs 9 Mar 2005 04:36:15 -0000 1.13
+++ Connection.cs 19 Apr 2006 16:02:24 -0000 1.14
@@ -116,7 +116,7 @@
// Maybe we already have a Connection object associated with
// this rawConnection then return it
IntPtr rawThis = dbus_connection_get_data (rawConnection, slot);
- if (rawThis != IntPtr.Zero) {
+ if (rawThis != IntPtr.Zero && ((GCHandle)rawThis).Target == typeof(DBus.Connection)) {
return (DBus.Connection) ((GCHandle)rawThis).Target;
}
}
Index: Message.cs
===================================================================
RCS file: /cvs/dbus/dbus/mono/Message.cs,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- Message.cs 9 Mar 2005 04:36:15 -0000 1.11
+++ Message.cs 19 Apr 2006 16:02:24 -0000 1.12
@@ -110,7 +110,7 @@
if (slot > -1) {
// If we already have a Message object associated with this rawMessage then return it
IntPtr rawThis = dbus_message_get_data(rawMessage, slot);
- if (rawThis != IntPtr.Zero)
+ if (rawThis != IntPtr.Zero && ((GCHandle)rawThis).Target == typeof(DBus.Message))
return (DBus.Message) ((GCHandle)rawThis).Target;
}
// If it doesn't exist then create a new Message around it
More information about the dbus-commit
mailing list