NetworkManager r3505 - in branches/NETWORKMANAGER_0_6_0_RELEASE: . src/named-manager
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: NetworkManager r3505 - in branches/NETWORKMANAGER_0_6_0_RELEASE: . src/named-manager
- Date: Wed, 26 Mar 2008 22:32:28 +0000 (GMT)
Author: dcbw
Date: Wed Mar 26 22:32:27 2008
New Revision: 3505
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3505&view=rev
Log:
2008-03-26 Dan Williams <dcbw redhat com>
Patch from Valentine Sinitsyn <e_val inbox ru> (gnome.org #353265)
* src/named-manager/nm-named-manager.c
- (compute_nameservers): return blank string if not config
- (rewrite_resolv_conf): write blank resolv.conf if no config, so that
cases like disabling wireless remove old information
Modified:
branches/NETWORKMANAGER_0_6_0_RELEASE/ChangeLog
branches/NETWORKMANAGER_0_6_0_RELEASE/src/named-manager/nm-named-manager.c
Modified: branches/NETWORKMANAGER_0_6_0_RELEASE/src/named-manager/nm-named-manager.c
==============================================================================
--- branches/NETWORKMANAGER_0_6_0_RELEASE/src/named-manager/nm-named-manager.c (original)
+++ branches/NETWORKMANAGER_0_6_0_RELEASE/src/named-manager/nm-named-manager.c Wed Mar 26 22:32:27 2008
@@ -288,6 +288,10 @@
g_return_val_if_fail (mgr != NULL, g_strdup (""));
g_return_val_if_fail (config != NULL, g_strdup (""));
+ /* config can be NULL */
+ if (!config)
+ return g_strdup ("");
+
num_nameservers = nm_ip4_config_get_num_nameservers (config);
if (num_nameservers > 3)
num_nameservers = 3; /* 'man resolv.conf' says we can't have > 3 */
@@ -412,10 +416,6 @@
NMIP4Config *ns_config = config;
gboolean success = FALSE;
- /* If no config, we don't have anything to update, so exit silently */
- if (!config)
- return TRUE;
-
/* If the sysadmin disabled modifying resolv.conf, exit silently */
if (!nm_system_should_modify_resolv_conf ()) {
nm_info ("DHCP returned name servers but system has disabled dynamic modification!");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]