mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-15 04:24:32 +00:00
2004-08-06 Seth Nickell <seth@gnome.org>
* panel-applet/NMWirelessApplet.c: (nmwa_new): Check the error code when getting a connection. * panel-applet/NMWirelessAppletDbus.c: (nmwa_dbus_init): Check if the NM service exists when initializing (rather than assuming it does not). * src/NetworkManagerDbus.c: (nm_dbus_init): Don't acquire the well-known service name until we have registered object/path handlers and can actually receive calls. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@42 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
00a4a641d6
commit
eacb8da619
17
ChangeLog
17
ChangeLog
|
@ -1,3 +1,20 @@
|
|||
2004-08-06 Seth Nickell <seth@gnome.org>
|
||||
|
||||
* panel-applet/NMWirelessApplet.c: (nmwa_new):
|
||||
|
||||
Check the error code when getting a connection.
|
||||
|
||||
* panel-applet/NMWirelessAppletDbus.c: (nmwa_dbus_init):
|
||||
|
||||
Check if the NM service exists when initializing (rather than
|
||||
assuming it does not).
|
||||
|
||||
* src/NetworkManagerDbus.c: (nm_dbus_init):
|
||||
|
||||
Don't acquire the well-known service name until we have
|
||||
registered object/path handlers and can actually receive
|
||||
calls.
|
||||
|
||||
2004-08-06 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* panel-applet/*
|
||||
|
|
|
@ -489,7 +489,7 @@ static GtkWidget * nmwa_new (NMWirelessApplet *applet)
|
|||
|
||||
applet->connection = nmwa_dbus_init(applet);
|
||||
applet->have_active_device = FALSE;
|
||||
applet->nm_active = FALSE;
|
||||
applet->nm_active = nmwa_dbus_nm_is_running(applet->connection);
|
||||
|
||||
nmwa_load_theme (applet);
|
||||
nmwa_setup_widgets (applet);
|
||||
|
|
|
@ -424,8 +424,14 @@ DBusConnection * nmwa_dbus_init (gpointer user_data)
|
|||
|
||||
dbus_error_init (&error);
|
||||
connection = dbus_bus_get (DBUS_BUS_SYSTEM, &error);
|
||||
if (!connection)
|
||||
|
||||
if (dbus_error_is_set (&error))
|
||||
{
|
||||
fprintf (stderr, "%s raised:\n %s\n\n", error.name, error.message);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
g_assert(connection);
|
||||
|
||||
if (!dbus_connection_add_filter (connection, nmwa_dbus_filter, user_data, NULL))
|
||||
return (NULL);
|
||||
|
|
|
@ -1268,12 +1268,6 @@ DBusConnection *nm_dbus_init (NMData *data)
|
|||
|
||||
dbus_connection_set_exit_on_disconnect (connection, FALSE);
|
||||
dbus_connection_setup_with_g_main (connection, NULL);
|
||||
dbus_bus_acquire_service (connection, NM_DBUS_SERVICE, 0, &dbus_error);
|
||||
if (dbus_error_is_set (&dbus_error))
|
||||
{
|
||||
NM_DEBUG_PRINT_1 ("nm_dbus_init() could not acquire its service. dbus_bus_acquire_service() says: '%s'\n", dbus_error.message);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
success = dbus_connection_register_object_path (connection, NM_DBUS_PATH, &nm_vtable, data);
|
||||
if (!success)
|
||||
|
@ -1305,5 +1299,12 @@ DBusConnection *nm_dbus_init (NMData *data)
|
|||
"sender='" DBUS_SERVICE_ORG_FREEDESKTOP_DBUS "'",
|
||||
&dbus_error);
|
||||
|
||||
dbus_bus_acquire_service (connection, NM_DBUS_SERVICE, 0, &dbus_error);
|
||||
if (dbus_error_is_set (&dbus_error))
|
||||
{
|
||||
NM_DEBUG_PRINT_1 ("nm_dbus_init() could not acquire its service. dbus_bus_acquire_service() says: '%s'\n", dbus_error.message);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
return (connection);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue