summaryrefslogtreecommitdiff
path: root/noncore/net
authormickeyl <mickeyl>2004-05-03 13:50:22 (UTC)
committer mickeyl <mickeyl>2004-05-03 13:50:22 (UTC)
commitaad04cffe30ef133edcd5051ce7e486f27599d83 (patch) (side-by-side diff)
tree830ccec1732ae743073511268c7bb67764c4fb6b /noncore/net
parent9efa98c49988a41de7613f56818f2e31bb24e22b (diff)
downloadopie-aad04cffe30ef133edcd5051ce7e486f27599d83.zip
opie-aad04cffe30ef133edcd5051ce7e486f27599d83.tar.gz
opie-aad04cffe30ef133edcd5051ce7e486f27599d83.tar.bz2
don't always write a capture file
Diffstat (limited to 'noncore/net') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/mainwindow.cpp30
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp12
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.h2
3 files changed, 22 insertions, 22 deletions
diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp
index 8525109..ef7ffcf 100644
--- a/noncore/net/wellenreiter/gui/mainwindow.cpp
+++ b/noncore/net/wellenreiter/gui/mainwindow.cpp
@@ -31,3 +31,3 @@
#include <qapplication.h>
-#include <qfiledialog.h>
+#include <qfiledialog.h>
#endif
@@ -191,3 +191,3 @@ void WellenreiterMainWindow::showConfigure()
{
- odebug << "show configure..." << oendl;
+ odebug << "show configure..." << oendl;
cw->setCaption( tr( "Configure" ) );
@@ -224,3 +224,3 @@ void WellenreiterMainWindow::changedSniffingState()
- if ( !mw->sniffing )
+ if ( !mw->sniffing && QFile::exists( mw->dumpname ) )
{
@@ -234,3 +234,3 @@ WellenreiterMainWindow::~WellenreiterMainWindow()
{
- odebug << "Wellenreiter: bye." << oendl;
+ odebug << "Wellenreiter: bye." << oendl;
};
@@ -254,3 +254,3 @@ void WellenreiterMainWindow::demoReadFromGps()
GPS* gps = new GPS( this );
- odebug << "Wellenreiter::demoReadFromGps(): url=gps://" << configwindow->gpsdHost->currentText() << ":" << configwindow->gpsdPort->value() << "/" << oendl;
+ odebug << "Wellenreiter::demoReadFromGps(): url=gps://" << configwindow->gpsdHost->currentText() << ":" << configwindow->gpsdPort->value() << "/" << oendl;
gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() );
@@ -308,3 +308,3 @@ void WellenreiterMainWindow::fileSaveLog()
f.close();
- odebug << "Saved log to file '" << fname << "'" << oendl;
+ odebug << "Saved log to file '" << fname << "'" << oendl;
}
@@ -312,3 +312,3 @@ void WellenreiterMainWindow::fileSaveLog()
{
- odebug << "Problem saving log to file '" << fname << "'" << oendl;
+ odebug << "Problem saving log to file '" << fname << "'" << oendl;
}
@@ -329,3 +329,3 @@ void WellenreiterMainWindow::fileSaveSession()
f.close();
- odebug << "Saved session to file '" << fname << "'" << oendl;
+ odebug << "Saved session to file '" << fname << "'" << oendl;
}
@@ -333,3 +333,3 @@ void WellenreiterMainWindow::fileSaveSession()
{
- odebug << "Problem saving session to file '" << fname << "'" << oendl;
+ odebug << "Problem saving session to file '" << fname << "'" << oendl;
}
@@ -351,3 +351,3 @@ void WellenreiterMainWindow::fileSaveHex()
f.close();
- odebug << "Saved hex log to file '" << fname << "'" << oendl;
+ odebug << "Saved hex log to file '" << fname << "'" << oendl;
}
@@ -355,3 +355,3 @@ void WellenreiterMainWindow::fileSaveHex()
{
- odebug << "Problem saving hex log to file '" << fname << "'" << oendl;
+ odebug << "Problem saving hex log to file '" << fname << "'" << oendl;
}
@@ -372,3 +372,3 @@ void WellenreiterMainWindow::fileLoadSession()
f.close();
- odebug << "Loaded session from file '" << fname << "'" << oendl;
+ odebug << "Loaded session from file '" << fname << "'" << oendl;
}
@@ -376,3 +376,3 @@ void WellenreiterMainWindow::fileLoadSession()
{
- odebug << "Problem loading session from file '" << fname << "'" << oendl;
+ odebug << "Problem loading session from file '" << fname << "'" << oendl;
}
@@ -441,3 +441,3 @@ void WellenreiterMainWindow::uploadSession()
{
- odebug << "Session upload cancelled :(" << oendl;
+ odebug << "Session upload cancelled :(" << oendl;
return;
@@ -445,3 +445,3 @@ void WellenreiterMainWindow::uploadSession()
- odebug << "Starting upload..." << oendl;
+ odebug << "Starting upload..." << oendl;
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index fe8f22d..2f85790 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -115,2 +115,3 @@ void Wellenreiter::signalHandler( int sig )
{
+ Wellenreiter::instance->pcap->closeDumpFile();
Wellenreiter::instance->pcap->close();
@@ -624,6 +625,2 @@ void Wellenreiter::startClicked()
}
- else // write it anyway ;)
- {
- dumpname = "/var/log/dump.wellenreiter";
- }
@@ -634,4 +631,7 @@ void Wellenreiter::startClicked()
- odebug << "Wellenreiter:: dumping to " << dumpname << "" << oendl;
- pcap->openDumpFile( dumpname );
+ if ( configwindow->writeCaptureFile->isChecked() )
+ {
+ odebug << "Wellenreiter:: dumping to " << dumpname << oendl;
+ pcap->openDumpFile( dumpname );
+ }
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.h b/noncore/net/wellenreiter/gui/wellenreiter.h
index 32e5690..f582a5f 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.h
+++ b/noncore/net/wellenreiter/gui/wellenreiter.h
@@ -57,2 +57,3 @@ class Wellenreiter : public WellenreiterBase {
public:
+ QString dumpname;
bool sniffing;
@@ -99,3 +100,2 @@ class Wellenreiter : public WellenreiterBase {
- QString dumpname;
Opie::Net::OWirelessNetworkInterface* iface;