mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2025-12-25 08:10:07 +01:00
* Throughout, grand renaming to strip out the use of "service", just say "name" instead (or "bus name" when ambiguous). Did not change the internal code of the message bus itself, only the programmer-facing API and messages. * doc/dbus-specification.xml: further update the message bus section * bus/config-parser.c (all_are_equiv): fix bug using freed string in error case
35 lines
662 B
C
35 lines
662 B
C
/* -*- mode: C; c-file-style: "gnu" -*- */
|
|
#include <dbus/dbus-glib.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
static GMainLoop *loop;
|
|
|
|
int
|
|
main (int argc, char **argv)
|
|
{
|
|
DBusGConnection *connection;
|
|
GError *error;
|
|
|
|
g_type_init ();
|
|
|
|
loop = g_main_loop_new (NULL, FALSE);
|
|
|
|
error = NULL;
|
|
connection = dbus_g_bus_get (DBUS_BUS_STARTER,
|
|
&error);
|
|
if (connection == NULL)
|
|
{
|
|
g_printerr ("Failed to open connection to bus: %s\n",
|
|
error->message);
|
|
g_error_free (error);
|
|
exit (1);
|
|
}
|
|
|
|
|
|
|
|
g_print ("Successfully completed %s\n", argv[0]);
|
|
|
|
return 0;
|
|
}
|