DBus program problem
Kiran Kumar Immidi
kimmidi@novell.com
23 Jan 2004 12:10:21 +0530
--=-I4/6FcUuIwx8jBX5g/98
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hi,
I am trying to have two applications communicate through the system
message bus. One of them the 'server' provides a service which the
client tries to access. Apparently, the messages that the client sends
do not reach the server (as I can see from strace) though the
dbus-daemon-1 picks it up. Could some one tell me where I am going
wrong? The sources are attached, the server does nothing more than
indicate that a message has been received.
I am running as root, and have my system.conf setup properly for this.
Regards,
Kiran Kumar Immidi
--=-I4/6FcUuIwx8jBX5g/98
Content-Disposition: attachment; filename=client.c
Content-Type: text/x-c; name=client.c; charset=ISO-8859-1
Content-Transfer-Encoding: base64
I2luY2x1ZGUgPGRidXMvZGJ1cy5oPg0KI2luY2x1ZGUgPGdsaWIuaD4NCiNpbmNsdWRlIDxzdGRp
by5oPg0KDQptYWluKCkNCnsNCglEQnVzQ29ubmVjdGlvbiAqY29ubmVjdGlvbjsNCglEQnVzRXJy
b3IgZXJyb3I7DQoJREJ1c01lc3NhZ2UgKm1lc3NhZ2U7DQoJREJ1c01lc3NhZ2VJdGVyIGl0ZXI7
DQoNCglkYnVzX2Vycm9yX2luaXQoJmVycm9yKTsNCgljb25uZWN0aW9uID0gZGJ1c19idXNfZ2V0
IChEQlVTX0JVU19TWVNURU0sICZlcnJvcik7DQoNCgltZXNzYWdlID0gZGJ1c19tZXNzYWdlX25l
d19tZXRob2RfY2FsbCAoIm9yZy5mcmVlZGVza3RvcC5UZXN0U2VydmljZSIsIA0KCQkJCQkiL29y
Zy9mcmVlZGVza3RvcC9UZXN0U2VydmljZSIsDQoJCQkJCU5VTEwsDQoJCQkJCSJJbml0aWFsaXpl
Iik7DQoJZGJ1c19tZXNzYWdlX2FwcGVuZF9hcmdzIChtZXNzYWdlLCBEQlVTX1RZUEVfSU5WQUxJ
RCk7DQoJZGJ1c19jb25uZWN0aW9uX3NlbmQgKGNvbm5lY3Rpb24sIG1lc3NhZ2UsIE5VTE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