Added flushing connection, that writes all queued outgoing messages to
the transport. Without flushing the connection, there is no guarantee
that messages have been sent to the networking buffers in the kernel
before the server sends the messages asynchronously and then exits
immediately.
It also prevents latencies from stacking during measurements under
heavy load.
Change-Id: I5383f0bb4e32c91542c887f2e55eb7bdd030d738
g_printerr("Error=%s\n", error->message);
g_error_free (error);
}*/
+ g_dbus_connection_flush(conn,
+ NULL, /* GCancellable */
+ NULL, /* GAsyncReadyCallback */
+ NULL); /* user_data */
if(is_lt) {
if(size <= ONE_PAGE_SIZE)
usleep(5000);
DBUS_TYPE_INVALID);
dbus_connection_send (conn, msg, NULL);
dbus_message_unref(msg);
+ dbus_connection_flush(conn);
if(is_lt) {
if(size <= ONE_PAGE_SIZE)
}
}
- dbus_connection_flush(conn);
free(cptr);
}
NULL,
NULL,
NULL);
+ g_dbus_connection_flush(connection,
+ NULL, /* GCancellable */
+ NULL, /* GAsyncReadyCallback */
+ NULL); /* user_data */
if (is_lt) {
if (size <= ONE_PAGE_SIZE)
usleep(5000);