diff options
author | Matthew Johnson <mjj29@hecate.matthew.ath.cx> | 2008-05-14 23:30:43 +0100 |
---|---|---|
committer | Matthew Johnson <mjj29@hecate.matthew.ath.cx> | 2008-05-14 23:30:43 +0100 |
commit | 97a2c200241def7c265446adcb978d3a049a78f1 (patch) | |
tree | 31624021945707e2b5cdf9cd27768e98cd7bd4e4 | |
parent | fb8145158aefc9c6e7de5b4ad679e5c9dcbc0530 (diff) |
* Fix dynamic introspection of objects which export the same
interface multiple times (Patch fromSveinung Kvilhaugsvik
<sveinung84 -at- users -dot- sourceforge -dot- net>)
-rw-r--r-- | changelog | 3 | ||||
-rw-r--r-- | org/freedesktop/dbus/DBusConnection.java | 4 |
2 files changed, 6 insertions, 1 deletions
@@ -5,6 +5,9 @@ Version 2.4.1: * Fix CreateInterface (Spotted by Tom Walsh <walshtc -at- gmail -dot- com>) * Fix serial assignment race condition (Spotted by Ed Wei <Edward.Wei.03 -at- alum -dot- dartmouth -dot- org>) + * Fix dynamic introspection of objects which export the same + interface multiple times (Patch from Sveinung Kvilhaugsvik + <sveinung84 -at- users -dot- sourceforge -dot- net>) Version 2.4: diff --git a/org/freedesktop/dbus/DBusConnection.java b/org/freedesktop/dbus/DBusConnection.java index 3fc6007..2ee444a 100644 --- a/org/freedesktop/dbus/DBusConnection.java +++ b/org/freedesktop/dbus/DBusConnection.java @@ -200,7 +200,9 @@ public class DBusConnection extends AbstractConnection int j = 0; while (j >= 0) { try { - ifcs.add(Class.forName(iface)); + Class ifclass = Class.forName(iface); + if (!ifcs.contains(ifclass)) + ifcs.add(ifclass); break; } catch (Exception e) {} j = iface.lastIndexOf("."); |