|
From: Jesús R. de I. <jes...@ha...> - 2008-09-17 08:47:23
|
It seems that there is a problem when the glib main loop must attend a dbus signal just after it
called a dbus method.
If that dbus signal handler emits a sigc signal, the last signal is actually never emitted (or at least,
a slot connected to it is never executed)
I have the following scenario:
Actors:
- testserver: A server of a simple service
- testclient 1 & testclient 2
test svc server
.------------------------------------.
| .-------------------------------. |
| | handle_key_pressed_event | |
.------->| dbus: _signal_mode_switched | |
| | | | |
| | '-------------------------------' |
| | | |
| '------------------|-----------------'
| |
| |
.----------------------------. | .----------------------------.
| sigc: signal_mode_switched |<----------------->| sigc: signal_mode_switched |
| | | |
| .-------------------.| | .-------------------. |
| | || | | | |
| | on_mode_switched: || | | on_mode_switched: | |
| | change label || | | change label | |
| '-------------------'| | '-------------------' |
| | | |
'----------------------------' '----------------------------'
test svc client 1 test svc client 2
- When the user clicks on the single program button, the client 1 calls the handle_key_pressed_event
dbus method of the server.
- Then the server emits the _signal_mode_switched dbus signal, which is received by both clients.
- On the clients, the _signal_mode_switched signal emits the sigc signal_mode_switched.
- on_mode_switched, which is connected to the signal_mode_switched, simply changes
a gtk label.
The problem is, on_mode_switch is only called on the client that didn't sent signal_mode_switched.
I have attached some sample code.
System Info:
Centos 5.2
dbus-python-0.70-7.el5
dbus-1.0.0-7.el5
dbus-glib-0.70-5
dbus-glib-devel-0.70-5
dbus-devel-1.0.0-7.el5
dbus-x11-1.0.0-7.el5
pygtk2-2.10.1-12.el5
gtk2-engines-2.8.0-3.el5
pygtk2-libglade-2.10.1-12.el5
libgtk-java-2.8.7-3.el5
gtkspell-2.0.11-2.1
gtksourceview-1.8.0-1.fc6
gtk2-2.10.4-20.el5
gtk2-devel-2.10.4-20.el5
gtkhtml3-3.16.3-1.el5
gtk-doc-1.7-1.fc6
gtkhtml2-2.11.0-3
gtkmm24-2.10.10-1.el5
pygtk2-codegen-2.10.1-12.el5
usermode-gtk-1.88-3.el5.1
authconfig-gtk-5.3.21-3.el5
gtkmm24-devel-2.10.10-1.el5
gnome-python2-gtksourceview-2.16.0-2.el5
pygtk2-devel-2.10.1-12.el5
latest dbus-c++ from git repo
--
Mit freundlichen Grüßen
Jesus Ruiz de Infante
(Entwicklung)
HALE electronic GmbH
Eugen-Müller-Straße 18, 5020 Salzburg, Austria
Tel: +43 (662) 439011 0
Fax: +43 (662) 439011 9
jes...@ha...
Firmenbuchnummer: FN 66801m HG Salzburg
--
Scanned by MailScanner.
|