DBusTransportSocket *socket_transport = (DBusTransportSocket*) transport;
dbus_bool_t need_read_watch;
DBusTransportSocket *socket_transport = (DBusTransportSocket*) transport;
dbus_bool_t need_read_watch;
- _dbus_verbose ("%s: fd = %d\n",
- _DBUS_FUNCTION_NAME, socket_transport->fd);
+ _dbus_verbose ("fd = %d\n",socket_transport->fd);
need_read_watch =
(_dbus_counter_get_size_value (transport->live_messages) < transport->max_live_messages_size) &&
(_dbus_counter_get_unix_fd_value (transport->live_messages) < transport->max_live_messages_unix_fds);
need_read_watch =
(_dbus_counter_get_size_value (transport->live_messages) < transport->max_live_messages_size) &&
(_dbus_counter_get_unix_fd_value (transport->live_messages) < transport->max_live_messages_unix_fds);
/* This is essential to avoid the check_write_watch() at the end,
* we don't want to add a write watch in do_iteration before
/* This is essential to avoid the check_write_watch() at the end,
* we don't want to add a write watch in do_iteration before
_dbus_transport_get_is_connected (transport))
{
if (!exchange_credentials (transport, do_reading, do_writing))
_dbus_transport_get_is_connected (transport))
{
if (!exchange_credentials (transport, do_reading, do_writing))
_dbus_string_set_length (&socket_transport->encoded_outgoing, 0);
_dbus_string_compact (&socket_transport->encoded_outgoing, 2048);
_dbus_string_set_length (&socket_transport->encoded_outgoing, 0);
_dbus_string_compact (&socket_transport->encoded_outgoing, 2048);
{
/* This is kind of a hack; if we have stuff to write, then try
* to avoid the poll. This is probably about a 5% speedup on an
{
/* This is kind of a hack; if we have stuff to write, then try
* to avoid the poll. This is probably about a 5% speedup on an
_dbus_watch_unref (socket_transport->write_watch);
failed_2:
_dbus_string_free (&socket_transport->encoded_incoming);
_dbus_watch_unref (socket_transport->write_watch);
failed_2:
_dbus_string_free (&socket_transport->encoded_incoming);
* @param host the host to connect to
* @param port the port to connect to
* @param family the address family to connect to
* @param host the host to connect to
* @param port the port to connect to
* @param family the address family to connect to
* @param error location to store reason for failure.
* @returns a new transport, or #NULL on failure.
*/
* @param error location to store reason for failure.
* @returns a new transport, or #NULL on failure.
*/
if (transport == NULL)
{
dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);
_dbus_close_socket (fd, NULL);
if (transport == NULL)
{
dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);
_dbus_close_socket (fd, NULL);