Diffstat (limited to 'noncore/net/networksetup/interfaces/interface.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/networksetup/interfaces/interface.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/noncore/net/networksetup/interfaces/interface.cpp b/noncore/net/networksetup/interfaces/interface.cpp index 929b3a1..e4f405e 100644 --- a/noncore/net/networksetup/interfaces/interface.cpp +++ b/noncore/net/networksetup/interfaces/interface.cpp @@ -65,4 +65,6 @@ void Interface::start(){ // check to see if we are already running. - if(true == status) + if(true == status){ + emit (updateMessage("Unable to start interface,\n already started")); return; + } @@ -70,4 +72,6 @@ void Interface::start(){ // See if it was successfull... - if(ret != 0) + if(ret != 0){ + emit (updateMessage("Starting interface failed.")); return; + } @@ -75,2 +79,3 @@ void Interface::start(){ refresh(); + emit (updateMessage("Start successfull")); } @@ -82,11 +87,16 @@ void Interface::stop(){ // check to see if we are already stopped. - if(false == status) + if(false == status){ + emit (updateMessage("Unable to stop interface,\n already stopped")); return; + } int ret = system(QString("%1 %2 down").arg(IFCONFIG).arg(this->name()).latin1()); - if(ret != 0) + if(ret != 0){ + emit (updateMessage("Stopping interface failed.")); return; + } - status = true; + status = false; refresh(); + emit (updateMessage("Stop successfull")); } |