Commit 6e29b283 authored by Simon McVittie's avatar Simon McVittie
Browse files

test-service: Don't close a shared connection



This is considered incorrect and causes a libdbus check failure.

Signed-off-by: Simon McVittie's avatarSimon McVittie <smcv@collabora.com>
parent f2dbcf2c
......@@ -9,6 +9,7 @@
static dbus_bool_t already_quit = FALSE;
static dbus_bool_t hello_from_self_reply_recived = FALSE;
static DBusConnection *connection = NULL;
static void
quit (void)
......@@ -31,22 +32,11 @@ check_hello_from_self_reply (DBusPendingCall *pcall,
DBusMessage *reply;
DBusMessage *echo_message, *echo_reply;
DBusError error;
DBusConnection *connection;
int type;
dbus_error_init (&error);
connection = dbus_bus_get (DBUS_BUS_STARTER, &error);
if (connection == NULL)
{
fprintf (stderr, "*** Failed to open connection to activating message bus: %s\n",
error.message);
dbus_error_free (&error);
die("no memory");
}
echo_message = (DBusMessage *)user_data;
reply = dbus_pending_call_steal_reply (pcall);
......@@ -325,10 +315,9 @@ main (int argc,
char **argv)
{
DBusError error;
DBusConnection *connection;
dbus_error_init (&error);
connection = dbus_bus_get (DBUS_BUS_STARTER, &error);
connection = dbus_bus_get_private (DBUS_BUS_STARTER, &error);
if (connection == NULL)
{
fprintf (stderr, "*** Failed to open connection to activating message bus: %s\n",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment