summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/mainwindow.cpp2
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp10
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.h2
3 files changed, 7 insertions, 7 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
@@ -223,5 +223,5 @@ void WellenreiterMainWindow::changedSniffingState()
menuBar()->setItemEnabled( stopID, mw->sniffing );
- if ( !mw->sniffing )
+ if ( !mw->sniffing && QFile::exists( mw->dumpname ) )
{
menuBar()->setItemEnabled( uploadID, true );
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
@@ -114,4 +114,5 @@ void Wellenreiter::signalHandler( int sig )
if ( Wellenreiter::instance->sniffing )
{
+ Wellenreiter::instance->pcap->closeDumpFile();
Wellenreiter::instance->pcap->close();
Wellenreiter::instance->stopClicked();
@@ -623,8 +624,4 @@ void Wellenreiter::startClicked()
dumpname.append( ".wellenreiter" );
}
- else // write it anyway ;)
- {
- dumpname = "/var/log/dump.wellenreiter";
- }
if ( cardtype != DEVTYPE_FILE )
@@ -633,6 +630,9 @@ void Wellenreiter::startClicked()
pcap->openCaptureFile( interface );
- odebug << "Wellenreiter:: dumping to " << dumpname << "" << oendl;
+ if ( configwindow->writeCaptureFile->isChecked() )
+ {
+ odebug << "Wellenreiter:: dumping to " << dumpname << oendl;
pcap->openDumpFile( dumpname );
+ }
if ( !pcap->isOpen() )
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
@@ -56,4 +56,5 @@ class Wellenreiter : public WellenreiterBase {
public:
+ QString dumpname;
bool sniffing;
static Wellenreiter* instance;
@@ -98,5 +99,4 @@ class Wellenreiter : public WellenreiterBase {
#endif
- QString dumpname;
Opie::Net::OWirelessNetworkInterface* iface;
Opie::Net::OPacketCapturer* pcap;