summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2013-03-12 14:01:43 -0400
committerDan Winship <danw@gnome.org>2013-04-03 10:23:48 -0400
commit213a3a4d2e0aaccc3d07bdd043d374ac660ce209 (patch)
treef8227a39070495f740e33247d4e5a514debe0c87 /src/main.c
parent0b815ca166748b69940c4735be8c7c2adf400e40 (diff)
downloadNetworkManager-213a3a4d2e0aaccc3d07bdd043d374ac660ce209.tar.gz
core: don't pass config data to NMDHCPManager and NMDnsManager
Rather than passing specific bits of data to NMDHCPManager and NMDnsManager, just let them call nm_config_get() and then get the data themselves. Also, remove the GError argument from nm_dhcp_manager_new(), since the function never returned NULL. This in turn means there is no longer any need for a distinction between nm_dhcp_manager_new() and nm_dhcp_manager_get(), so remove the former.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index dff1bdb261..9210d7332b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -493,7 +493,7 @@ main (int argc, char *argv[])
goto done;
}
- dns_mgr = nm_dns_manager_get (nm_config_get_dns_plugins (config));
+ dns_mgr = nm_dns_manager_get ();
if (!dns_mgr) {
nm_log_err (LOGD_CORE, "failed to start the DNS manager.");
goto done;
@@ -535,7 +535,7 @@ main (int argc, char *argv[])
}
/* Initialize DHCP manager */
- dhcp_mgr = nm_dhcp_manager_new (nm_config_get_dhcp_client (config), &error);
+ dhcp_mgr = nm_dhcp_manager_get ();
if (!dhcp_mgr) {
nm_log_err (LOGD_CORE, "failed to start the DHCP manager: %s.", error->message);
goto done;