chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] dbus:send bug


From: John J Foerch
Subject: [Chicken-users] dbus:send bug
Date: Tue, 15 Mar 2011 02:22:50 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Hello,

There seems to be an error in dbus:send in the dbus egg.  As a test
case, the first example given in the dbus egg docs will show the
problem:

http://wiki.call-cc.org/eggref/4/dbus#examples-you-can-test-with-qt

I built the two programs 'car-example-client' and 'car-example-server'.
There is a trivial bug in the code for the server; you just need to
rename the symbol 'dbus:enable-polling-thread' to
'dbus:enable-polling-thread!'.

I used dbus-monitor to inspect the dbus traffic in the test.  That
program outputs a lot of information, so to keep the following listing
short, I've snipped out stuff that is irrelevant to this test.

=== BEGIN LISTING ===
$ dbus-monitor &
 [SNIP]
$ ./car-example-server &
 [SNIP]
$ ./car-example-client
 [SNIP]
signal sender=:1.110 -> dest=(null destination) serial=2 path=/Car; 
interface=com.trolltech.Examples.CarInterface; member=turnRight
 [SNIP]
$ dbus-send --dest=com.trolltech.CarExample /Car 
com.trolltech.Examples.CarInterface.turnRight
 [SNIP]
signal sender=:1.111 -> dest=com.trolltech.CarExample serial=2 path=/Car; 
interface=com.trolltech.Examples.CarInterface; member=turnRight
 [SNIP]
car is turning to the right
=== END LISTING ===

Notice that when I ran car-example-client, the 'dest' field of the dbus
message is "(null)" destination, and the car did not turn to the right,
but when I sent a message with dbus-send, with the correct 'dest',
car-example-server received and responded to the message.

Looking at the definition of dbus:send in dbus.scm, the problem appears
to be related to the fact that the function binds the variable 'service'
to the correct value, but never uses it.

Thank you,

-- 
John Foerch




reply via email to

[Prev in Thread] Current Thread [Next in Thread]