Credentials-passing nul byte missing

jerome zh jeromezhr at gmail.com
Tue Jun 21 07:59:42 PDT 2011


Hello,

I am now using DBUS (have been ported to eCos) under TCP mode. I find some
useful code in the mail achives by directly call the low level C API, which
connect to the daemon as follows.

#define REMOTE_ADDRESS "tcp:host=x.x.x.x, port=xxxx, family=ipv4"
conn = dbus_connection_open(REMOTE_ADDRESS, &error);
dbus_bus_register(conn, &error);
......

The above code works fine on linux, but not on eCos. The client cannot
register itself on the daemon.
I got the reason by capturing packets over the wire. And I found the failure
was caused by NO credentials-passing nul byte was send right after the tcp
connection established.

I reviewed the source of the C APIs and didn't find the code piece used for
sending out the nul byte.
Then I tried to add some code into the send_auth(..)  method, which will
set nul to the first byte of the first packet sent out after the tcp
connection established. This did the trick. But I still don't think it's a
really good idea by adding extra codes.

Could you give me some hint to locate the original code for sending out the
nul byte?


*Thanks and Regards,
Jerome*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20110621/8d6182bd/attachment.htm>


More information about the dbus mailing list