[PC-BSD Commits] r15627 - pcbsd/current/src-qt4/libpcbsd
svn at pcbsd.org
svn at pcbsd.org
Tue Feb 28 10:40:25 PST 2012
Author: kris
Date: 2012-02-28 18:40:24 +0000 (Tue, 28 Feb 2012)
New Revision: 15627
Modified:
pcbsd/current/src-qt4/libpcbsd/netif.cpp
pcbsd/current/src-qt4/libpcbsd/utils.cpp
Log:
Fix some logic checking for commented out lines
Modified: pcbsd/current/src-qt4/libpcbsd/netif.cpp
===================================================================
--- pcbsd/current/src-qt4/libpcbsd/netif.cpp 2012-02-28 18:38:39 UTC (rev 15626)
+++ pcbsd/current/src-qt4/libpcbsd/netif.cpp 2012-02-28 18:40:24 UTC (rev 15627)
@@ -408,7 +408,6 @@
//Set defaults for quick-connect
ifConfigLine="SYNCDHCP"; //Use DHCP
- bool usingLagg=false; //Don't use lagg interface (not setup yet)
//setup for not using the lagg interface
Utils::setConfFileValue( "/etc/rc.conf", "ifconfig_lagg0", "", -1);
Modified: pcbsd/current/src-qt4/libpcbsd/utils.cpp
===================================================================
--- pcbsd/current/src-qt4/libpcbsd/utils.cpp 2012-02-28 18:38:39 UTC (rev 15626)
+++ pcbsd/current/src-qt4/libpcbsd/utils.cpp 2012-02-28 18:40:24 UTC (rev 15627)
@@ -240,7 +240,7 @@
line = stream.readLine(); // line of text excluding '\n'
// If the KEY is found in the line, continue processing
- if ( line.indexOf("#", 0) == 0 || line.indexOf(Key, 0) == -1 || line.indexOf(Key, 0) > 0)
+ if ( line.trimmed().indexOf("#", 0) == 0 || line.indexOf(Key, 0) == -1 || line.indexOf(Key, 0) > 0)
continue;
if ( found == occur) {
@@ -282,7 +282,7 @@
line = stream.readLine(); // line of text excluding '\n'
// If the KEY is not found in the line, continue processing
- if ( line.indexOf("#", 0) == 0 || line.indexOf(rx, 0) == -1 || line.indexOf(rx, 0) > 0)
+ if ( line.trimmed().indexOf("#", 0) == 0 || line.indexOf(rx, 0) == -1 || line.indexOf(rx, 0) > 0)
continue;
if ( found == occur ) {
@@ -343,7 +343,7 @@
}
// Found the key, but it is commented out, so don't worry about this line
- if ( line.indexOf("#", 0) == 0 ) {
+ if ( line.trimmed().indexOf("#", 0) == 0 ) {
SavedFile << line ;
continue;
}
More information about the Commits
mailing list