core: fix NMManager in private-bus-only case

NMManager was failing to initialize if there was only a private bus,
despite the fact that this is exactly the use case that the private
bus was added for.

The only other potentially-failing code in nm_manager_new() was adding
prop_filter to the D-Bus connection, but this can't really fail, so
just assert that it doesn't. And now, nm_manager_new() always
succeeds, so update the caller for that.
This commit is contained in:
Dan Winship
2015-07-31 12:33:07 -04:00
parent c44069c10a
commit 1c11c5cff1
3 changed files with 15 additions and 45 deletions

View File

@@ -459,13 +459,7 @@ main (int argc, char *argv[])
net_enabled,
wifi_enabled,
wwan_enabled,
wimax_enabled,
&error);
if (manager == NULL) {
nm_log_err (LOGD_CORE, "failed to initialize the network manager: %s",
error && error->message ? error->message : "(unknown)");
goto done;
}
wimax_enabled);
g_signal_connect (manager, NM_MANAGER_CONFIGURE_QUIT, G_CALLBACK (manager_configure_quit), config);