summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-03-31 15:00:44 (UTC)
committer mickeyl <mickeyl>2003-03-31 15:00:44 (UTC)
commitf3b37f3dd4ae27e809415af67dd4df052d72d076 (patch) (unidiff)
tree36216a0e3543b11499da3ea56e2e0695c188c49d
parent13e8e8cbaede72948d3901a1a903eba43854d770 (diff)
downloadopie-f3b37f3dd4ae27e809415af67dd4df052d72d076.zip
opie-f3b37f3dd4ae27e809415af67dd4df052d72d076.tar.gz
opie-f3b37f3dd4ae27e809415af67dd4df052d72d076.tar.bz2
only cardctl reset after sniffing. maybe later make calling dhcp client a configurable option.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index d1dd73a..e294eb8 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -139,49 +139,49 @@ void Wellenreiter::startStopClicked()
139{ 139{
140 if ( sniffing ) 140 if ( sniffing )
141 { 141 {
142 disconnect( SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); 142 disconnect( SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) );
143 143
144 iface->setChannelHopping(); // stop hopping channels 144 iface->setChannelHopping(); // stop hopping channels
145 pcap->close(); 145 pcap->close();
146 sniffing = false; 146 sniffing = false;
147 #ifdef QWS 147 #ifdef QWS
148 oApp->setTitle(); 148 oApp->setTitle();
149 #else 149 #else
150 qApp->mainWidget()->setCaption( "Wellenreiter II" ); 150 qApp->mainWidget()->setCaption( "Wellenreiter II" );
151 #endif 151 #endif
152 152
153 // get interface name from config window 153 // get interface name from config window
154 const QString& interface = configwindow->interfaceName->currentText(); 154 const QString& interface = configwindow->interfaceName->currentText();
155 ONetwork* net = ONetwork::instance(); 155 ONetwork* net = ONetwork::instance();
156 iface = static_cast<OWirelessNetworkInterface*>(net->interface( interface )); 156 iface = static_cast<OWirelessNetworkInterface*>(net->interface( interface ));
157 157
158 // switch off monitor mode 158 // switch off monitor mode
159 iface->setMonitorMode( false ); 159 iface->setMonitorMode( false );
160 // switch off promisc flag 160 // switch off promisc flag
161 iface->setPromiscuousMode( false ); 161 iface->setPromiscuousMode( false );
162 162
163 system( "cardctl reset; sleep 1; dhclient; udhcpc" ); //FIXME: Use OProcess 163 system( "cardctl reset; sleep 1" ); //FIXME: Use OProcess
164 164
165 // message the user 165 // message the user
166 QMessageBox::information( this, "Wellenreiter II", "Your wireless card\nshould now be usable again." ); 166 QMessageBox::information( this, "Wellenreiter II", "Your wireless card\nshould now be usable again." );
167 } 167 }
168 168
169 else 169 else
170 { 170 {
171 // get configuration from config window 171 // get configuration from config window
172 172
173 const QString& interface = configwindow->interfaceName->currentText(); 173 const QString& interface = configwindow->interfaceName->currentText();
174 const int cardtype = configwindow->daemonDeviceType(); 174 const int cardtype = configwindow->daemonDeviceType();
175 const int interval = configwindow->daemonHopInterval(); 175 const int interval = configwindow->daemonHopInterval();
176 176
177 if ( ( interface == "" ) || ( cardtype == 0 ) ) 177 if ( ( interface == "" ) || ( cardtype == 0 ) )
178 { 178 {
179 QMessageBox::information( this, "Wellenreiter II", "Your device is not\nproperly configured. Please reconfigure!" ); 179 QMessageBox::information( this, "Wellenreiter II", "Your device is not\nproperly configured. Please reconfigure!" );
180 return; 180 return;
181 } 181 }
182 182
183 // configure device 183 // configure device
184 184
185 ONetwork* net = ONetwork::instance(); 185 ONetwork* net = ONetwork::instance();
186 iface = static_cast<OWirelessNetworkInterface*>(net->interface( interface )); 186 iface = static_cast<OWirelessNetworkInterface*>(net->interface( interface ));
187 187