ghal maraz
9th March 2011, 10:37
Hi,
I am trying to start my own QDBusServer and connect some Applications to it. It seems that the server starts, but the connectToBus()-Method blocks and never returns.
Here is the server code:
int main(int argc, char **argv) {
QCoreApplication a(argc, argv);
new QDBusServer("unix:abstract=/home/ghalmaraz/dbussocket",&a);
return a.exec();
}
Afterwards:
# export DBUS_SESSION_BUS_ADDRESS=unix:abstract=/home/ghalmaraz/dbussocket
# qdbus
shows no reaction (just blocking the terminal)
The qdbusviewer-App blocks for a long time (about 20s), too. But then it starts and gives me the following error message:
Error: Cannot connect to D-Bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
In this moment the server produces output, too:
QDBusConnectionPrivate::connectSignal: received error from D-Bus server while connecting signal to QDBusAbstractInterface::_q_serviceOwnerChanged(QSt ring,QString,QString): org.freedesktop.DBus.Error.Disconnected (Connection was disconnected before a reply was received)
Can someone help me or knows an example for this issue?
best regards
ghal maraz
I am trying to start my own QDBusServer and connect some Applications to it. It seems that the server starts, but the connectToBus()-Method blocks and never returns.
Here is the server code:
int main(int argc, char **argv) {
QCoreApplication a(argc, argv);
new QDBusServer("unix:abstract=/home/ghalmaraz/dbussocket",&a);
return a.exec();
}
Afterwards:
# export DBUS_SESSION_BUS_ADDRESS=unix:abstract=/home/ghalmaraz/dbussocket
# qdbus
shows no reaction (just blocking the terminal)
The qdbusviewer-App blocks for a long time (about 20s), too. But then it starts and gives me the following error message:
Error: Cannot connect to D-Bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
In this moment the server produces output, too:
QDBusConnectionPrivate::connectSignal: received error from D-Bus server while connecting signal to QDBusAbstractInterface::_q_serviceOwnerChanged(QSt ring,QString,QString): org.freedesktop.DBus.Error.Disconnected (Connection was disconnected before a reply was received)
Can someone help me or knows an example for this issue?
best regards
ghal maraz