summaryrefslogtreecommitdiff
authorkergoth <kergoth>2003-04-15 00:46:48 (UTC)
committer kergoth <kergoth>2003-04-15 00:46:48 (UTC)
commit79e83da7936995f247f7ad7ad0f768b6e2545cf1 (patch) (side-by-side diff)
treea0c1d7c382d6374c2c941b30a00515cbdcfd9270
parentf3905e771c1abd5fdc430aba364934b717dfa115 (diff)
downloadopie-79e83da7936995f247f7ad7ad0f768b6e2545cf1.zip
opie-79e83da7936995f247f7ad7ad0f768b6e2545cf1.tar.gz
opie-79e83da7936995f247f7ad7ad0f768b6e2545cf1.tar.bz2
Only restart interface if it was UP previously.
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings/interfaces/interfacesetupimp.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
index 8d78828..49a47ae 100644
--- a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
+++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
@@ -44,15 +44,15 @@ InterfaceSetupImp::~InterfaceSetupImp(){
bool InterfaceSetupImp::saveChanges(){
bool error;
QString iface = interfaces->getInterfaceName(error);
if(!saveSettings())
return false;
- qWarning("restarting interface %s\n", iface.latin1());
interfaces->write();
+ if (interface->getStatus()) {
QString ifup;
ifup += "ifdown ";
ifup += iface;
ifup += "; ifup ";
ifup += iface;
ifup += ";";
@@ -73,13 +73,13 @@ bool InterfaceSetupImp::saveChanges(){
}
owait->hide();
delete owait;
interface->refresh();
-
+ }
return true;
}
/**
* Save the settings for the current Interface.
* @return bool true if successfull, false otherwise