X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dbus%2Fdbus-transport-socket.c;h=5da3e986d6c5d7b7d75ebd3b45ea2499807bab89;hb=5cf4959a8fa2958dbc2215ccdadbb2e270719e34;hp=1dfb1408b620689b2dc99950def81fba383ae4a1;hpb=0d7318ccc72b0b984a3a27e71eb5e9a3919ff3bb;p=platform%2Fupstream%2Fdbus.git diff --git a/dbus/dbus-transport-socket.c b/dbus/dbus-transport-socket.c index 1dfb140..5da3e98 100644 --- a/dbus/dbus-transport-socket.c +++ b/dbus/dbus-transport-socket.c @@ -29,6 +29,7 @@ #include "dbus-transport-protected.h" #include "dbus-watch.h" #include "dbus-credentials.h" +#include //todo to remove /** * @defgroup DBusTransportSocket DBusTransport implementations for sockets @@ -529,6 +530,8 @@ do_writing (DBusTransport *transport) int header_len, body_len; int total_bytes_to_write; +// int i; + if (total > socket_transport->max_bytes_written_per_iteration) { _dbus_verbose ("%d bytes exceeds %d bytes written per iteration, returning\n", @@ -550,6 +553,32 @@ do_writing (DBusTransport *transport) header_len = _dbus_string_get_length (header); body_len = _dbus_string_get_length (body); + /* fprintf (stderr, "\nheader:\n"); //todo for test - to remove + for(i=0; i < header_len; i++) + { + fprintf (stderr, "%02x", _dbus_string_get_byte(header,i)); + } + fprintf (stderr,"\n"); + for(i=0; i < header_len; i++) + { + fprintf (stderr, "%c", _dbus_string_get_byte(header,i)); + } + fprintf (stderr, "\nret size: %u, i: %u\n", header_len, i); + + + fprintf (stderr, "\nbody:\n"); + for(i=0; i < body_len; i++) + { + fprintf (stderr, "%02x", _dbus_string_get_byte(body,i)); + } + fprintf (stderr, "\nret size: %u, i: %u\n", body_len, i); + fprintf (stderr,"\n"); + for(i=0; i < body_len; i++) + { + fprintf (stderr, "%c", _dbus_string_get_byte(body,i)); + } + fprintf (stderr, "\nret size: %u, i: %u\n", body_len, i);*/ + if (_dbus_auth_needs_encoding (transport->auth)) { /* Does fd passing even make sense with encoded data? */ @@ -677,8 +706,8 @@ do_writing (DBusTransport *transport) _dbus_string_set_length (&socket_transport->encoded_outgoing, 0); _dbus_string_compact (&socket_transport->encoded_outgoing, 2048); - _dbus_connection_message_sent (transport->connection, - message); + _dbus_connection_message_sent_unlocked (transport->connection, + message); } } } @@ -1337,12 +1366,12 @@ _dbus_transport_new_for_tcp_socket (const char *host, goto error; if (family != NULL && - (!_dbus_string_append (&address, "family=") || + (!_dbus_string_append (&address, ",family=") || !_dbus_string_append (&address, family))) goto error; if (noncefile != NULL && - (!_dbus_string_append (&address, "noncefile=") || + (!_dbus_string_append (&address, ",noncefile=") || !_dbus_string_append (&address, noncefile))) goto error;