Howto setup/connect to a listening server [dbus_server_liste(...)] ?
rony
rony at wu.ac.at
Fri Jul 22 09:11:42 PDT 2011
Starting successfully the server like this:
DBusServer *server=dbus_server_listen(address, &err);
... no error indicated, hence: ...
dbus_server_set_new_connection_function(server, new_connection_callback, // callback function
ccb, // *data
(void (*)(void*)) RexxFreeMemory // memory free function
);
To connect to the server using from another session using:
DBusConnection *conn=dbus_connection_open_private(address, &err);
... no error indicated ...
The problem: using the addresses "unix:path=/tmp/dbus-test" or
"tcp:host=localhost,port=23000,family=ipv4;" allows to run
dbus_server_listen() and doing a dbus_connection_open_private() with no
errors. [I can pass the pointers to respective dbus-functions.]
However, the registered new_connection_callback()-function gets never
invoked and if sending messages from the client no answers are received,
but rather timeouts occur. Here's the signature that compiles successfully:
void new_connection_callback (DBusServer *server, DBusConnection *conn, void *data) {...}
When killing the server, then a pending call to the server from the
client sessions stops (with a "org.freedesktop.DBus.Error.NoReply" error
message).
This is running on Ubuntu 64 with dbus 1.4.0.
What could be the reason(s) that the new_connection_callback()-function
does not get invoked? Are there any additional steps that need to be
taken in order for the client to be able to successfully connect to the
server and become able to communicate with it?
---rony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20110722/b3f1b2f7/attachment.html>
More information about the dbus
mailing list