diff --git a/Rakefile b/Rakefile index 79db177..14b68a0 100644 --- a/Rakefile +++ b/Rakefile @@ -9,3 +9,7 @@ end task :testSignal do sh "dbus-send --dest=ca.thume.ddbus.test /signaler ca.thume.test.signal int32:9" end + +task :testDbus do + sh "dbus-send --session --dest=org.freedesktop.DBus --type=method_call --print-reply /org/freedesktop/DBus org.freedesktop.DBus.ListNames" +end diff --git a/source/ddbus/router.d b/source/ddbus/router.d index 91414cb..49744ba 100644 --- a/source/ddbus/router.d +++ b/source/ddbus/router.d @@ -76,13 +76,13 @@ class MessageRouter { handleIntrospect(pattern.path, msg, conn); return true; } - + MessageHandler* handler = (pattern in callTable); if(handler is null) return false; // Check for matching argument types version(DDBusNoChecking) { - + } else { if(!equal(join(handler.argSig), msg.signature())) { return false; @@ -122,8 +122,8 @@ class MessageRouter { string introspectXML(string path) { auto methods = callTable.byKey().filter!(a => (a.path == path) && !a.signal)().array() // .schwartzSort!((a) => a.iface, "a a.iface < b.iface)().release(); - auto ifaces = groupBy!((a) => a.iface)(methods); + .sort!((a,b) => a.iface < b.iface)(); + auto ifaces = methods.groupBy(); auto app = appender!string; formattedWrite(app,introspectHeader,path); foreach(iface; ifaces) { @@ -153,7 +153,7 @@ class MessageRouter { foreach(child; children) { formattedWrite(app,``,child); } - + app.put(""); return app.data; }