summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opienet/onetwork.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/libopie2/opienet/onetwork.cpp b/libopie2/opienet/onetwork.cpp
index ab3e77f..26a6c81 100644
--- a/libopie2/opienet/onetwork.cpp
+++ b/libopie2/opienet/onetwork.cpp
@@ -57,10 +57,10 @@
57 57
58#ifndef NODEBUG 58#ifndef NODEBUG
59#include <opie2/odebugmapper.h> 59#include <opie2/odebugmapper.h>
60 60
61 61
62using namespace Opie::Core; 62using namespace Opie::Core;
63using namespace Opie::Net::Private; 63using namespace Opie::Net::Private;
64DebugMapper* debugmapper = new DebugMapper(); 64DebugMapper* debugmapper = new DebugMapper();
65#endif 65#endif
66 66
@@ -68,8 +68,8 @@ DebugMapper* debugmapper = new DebugMapper();
68 * ONetwork 68 * ONetwork
69 *======================================================================================*/ 69 *======================================================================================*/
70 70
71namespace Opie { 71namespace Opie {
72namespace Net { 72namespace Net {
73ONetwork* ONetwork::_instance = 0; 73ONetwork* ONetwork::_instance = 0;
74 74
75ONetwork::ONetwork() 75ONetwork::ONetwork()
@@ -1006,7 +1006,8 @@ int OWirelessNetworkInterface::signalStrength() const
1006 int lev = stat.qual.level; //FIXME: Do something with them? 1006 int lev = stat.qual.level; //FIXME: Do something with them?
1007 int noi = stat.qual.noise; //FIXME: Do something with them? 1007 int noi = stat.qual.noise; //FIXME: Do something with them?
1008 1008
1009 return cur*100/max; 1009
1010 return max != 0 ? cur*100/max: -1;
1010} 1011}
1011 1012
1012 1013
@@ -1243,6 +1244,6 @@ QString OOrinocoMonitoringInterface::name() const
1243{ 1244{
1244 return "orinoco"; 1245 return "orinoco";
1245} 1246}
1246 1247
1247} 1248}
1248} 1249}