Diffstat (limited to 'noncore/net/opiestumbler/stumbler.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opiestumbler/stumbler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/net/opiestumbler/stumbler.cpp b/noncore/net/opiestumbler/stumbler.cpp index cda6b99..10e89ce 100644 --- a/noncore/net/opiestumbler/stumbler.cpp +++ b/noncore/net/opiestumbler/stumbler.cpp | |||
@@ -14,52 +14,52 @@ Stumbler::Stumbler(const QString &iface, QObject *parent, const char *name) | |||
14 | :QObject(parent, name), m_interval(5000), | 14 | :QObject(parent, name), m_interval(5000), |
15 | m_wifaceName(iface), | 15 | m_wifaceName(iface), |
16 | m_timer(new QTimer(this)) | 16 | m_timer(new QTimer(this)) |
17 | { | 17 | { |
18 | m_wiface = static_cast<OWirelessNetworkInterface*>(ONetwork::instance()->interface(m_wifaceName)); | 18 | m_wiface = static_cast<OWirelessNetworkInterface*>(ONetwork::instance()->interface(m_wifaceName)); |
19 | connect(m_timer, SIGNAL(timeout()), this, SLOT(slotRefresh())); | 19 | connect(m_timer, SIGNAL(timeout()), this, SLOT(slotRefresh())); |
20 | } | 20 | } |
21 | 21 | ||
22 | 22 | ||
23 | void Stumbler::start() | 23 | void Stumbler::start() |
24 | { | 24 | { |
25 | if (!m_wiface) { | 25 | if (!m_wiface) { |
26 | odebug << "Error, interface " << m_wifaceName << " does not exist" << oendl; | 26 | odebug << "Error, interface " << m_wifaceName << " does not exist" << oendl; |
27 | return; | 27 | return; |
28 | } | 28 | } |
29 | 29 | ||
30 | if (!ONetwork::instance()->isWirelessInterface(m_wifaceName.ascii())) { | 30 | if (!ONetwork::instance()->isWirelessInterface(m_wifaceName.ascii())) { |
31 | odebug << "Error, " << m_wifaceName << " is not a wireless interface" << oendl; | 31 | odebug << "Error, " << m_wifaceName << " is not a wireless interface" << oendl; |
32 | //FIXME: Tell the user about this | 32 | //FIXME: Tell the user about this |
33 | return; | 33 | return; |
34 | } | 34 | } |
35 | 35 | ||
36 | if (!m_timer->isActive()) { | 36 | if (!m_timer->isActive()) { |
37 | odebug << "Starting stumbler" << oendl; | 37 | odebug << "Starting stumbler" << oendl; |
38 | m_wiface->setUp(FALSE); | 38 | m_wiface->setUp(false); |
39 | m_wiface->setSSID("any"); | 39 | m_wiface->setSSID("any"); |
40 | m_wiface->setAssociatedAP( OMacAddress::broadcast ); | 40 | m_wiface->setAssociatedAP( OMacAddress::broadcast ); |
41 | m_wiface->setUp(TRUE); | 41 | m_wiface->setUp(true); |
42 | m_timer->start(m_interval); | 42 | m_timer->start(m_interval); |
43 | } | 43 | } |
44 | } | 44 | } |
45 | 45 | ||
46 | void Stumbler::stop() | 46 | void Stumbler::stop() |
47 | { | 47 | { |
48 | if (m_timer->isActive()) { | 48 | if (m_timer->isActive()) { |
49 | odebug << "Stoping stumbler" << oendl; | 49 | odebug << "Stoping stumbler" << oendl; |
50 | m_timer->stop(); | 50 | m_timer->stop(); |
51 | } | 51 | } |
52 | } | 52 | } |
53 | 53 | ||
54 | void Stumbler::setInterval(int msec) | 54 | void Stumbler::setInterval(int msec) |
55 | { | 55 | { |
56 | m_interval = msec; | 56 | m_interval = msec; |
57 | if (m_timer->isActive()) { | 57 | if (m_timer->isActive()) { |
58 | m_timer->stop(); | 58 | m_timer->stop(); |
59 | m_timer->start(m_interval); | 59 | m_timer->start(m_interval); |
60 | } | 60 | } |
61 | } | 61 | } |
62 | 62 | ||
63 | void Stumbler::setIface(const QString &iface) | 63 | void Stumbler::setIface(const QString &iface) |
64 | { | 64 | { |
65 | m_wifaceName = iface; | 65 | m_wifaceName = iface; |