diff options
author | Christian Pointner <equinox@anytun.org> | 2008-12-27 00:06:09 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2008-12-27 00:06:09 +0000 |
commit | 9985e088f7a2b3644948786895d29d2d8f56c736 (patch) | |
tree | fb9b30426a0c1fb0f2d5b75a171a99df14e6aca4 /src/linux/tunDevice.cpp | |
parent | typo in help (diff) |
fixed some compiler warnings for ubuntu intrepid
Diffstat (limited to 'src/linux/tunDevice.cpp')
-rw-r--r-- | src/linux/tunDevice.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/linux/tunDevice.cpp b/src/linux/tunDevice.cpp index c743229..0c51047 100644 --- a/src/linux/tunDevice.cpp +++ b/src/linux/tunDevice.cpp @@ -44,7 +44,7 @@ #include "tunDevice.h" #include "threadUtils.hpp" - +#include "log.h" TunDevice::TunDevice(std::string dev_name, std::string dev_type, std::string ifcfg_lp, std::string ifcfg_rnmp) : conf_(dev_name, dev_type, ifcfg_lp, ifcfg_rnmp, 1400) { @@ -172,5 +172,9 @@ void TunDevice::do_ifconfig() command << conf_.remote_netmask_.toString() << " mtu " << conf_.mtu_; - system(command.str().c_str()); + int result = system(command.str().c_str()); + if(result == -1) + cLog.msg(Log::PRIO_ERR) << "Execution of ifconfig failed"; + else + cLog.msg(Log::PRIO_NOTICE) << "ifconfig returned " << WEXITSTATUS(result); } |