From 4acec249d48e57c911fc2544d92785b86d5f08d0 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Mon, 15 Dec 2003 15:16:26 +0000 Subject: use current dumpname, not always /var/log/... --- (limited to 'noncore') diff --git a/noncore/net/wellenreiter/gui/configbase.ui b/noncore/net/wellenreiter/gui/configbase.ui index 4fc8ea1..2c335df 100644 --- a/noncore/net/wellenreiter/gui/configbase.ui +++ b/noncore/net/wellenreiter/gui/configbase.ui @@ -11,8 +11,8 @@ 0 0 - 286 - 345 + 303 + 343 @@ -59,7 +59,7 @@ margin - 11 + 6 spacing @@ -706,7 +706,7 @@ margin - 11 + 6 spacing @@ -773,6 +773,10 @@ GroupBox4_2 + enabled + false + + title Action On Detecting @@ -856,7 +860,7 @@ margin - 11 + 6 spacing @@ -1066,166 +1070,178 @@ title GPS - - QLayoutWidget + - name - Layout1 + margin + 5 - geometry - - 10 - 40 - 216 - 27 - + spacing + 4 - - - margin - 0 - + + QLayoutWidget - spacing - 6 + name + Layout6 - - QLabel + - name - TextLabel1_4 + margin + 0 - text - Host + spacing + 6 - - - QComboBox - - + + QCheckBox + + name + enableGPS + + text - localhost + Enable GPS logging w/ gpsd - - - name - gpsdHost - - - enabled - false - - - editable - true - - - currentItem - 0 - - - - QLabel - - name - TextLabel2_2 - - - text - : - - - - QSpinBox - - name - gpsdPort - - - enabled - false - - - maxValue - 65535 - - - minValue - 1024 - - - value - 2947 - - - - - - QLineEdit - - name - commandGPS - - - enabled - false - - - geometry - - 10 - 110 - 210 - 22 - - - - text - gpsd -p /dev/ttyS3 -s 57600 - - - - QCheckBox - - name - enableGPS - - - geometry - - 10 - 10 - 199 - 21 - - - - text - Enable GPS logging w/ gpsd - - - - QCheckBox - - name - startGPS - - - geometry - - 10 - 80 - 171 - 21 - - - - text - Start gpsd on localhost - - + + + QLayoutWidget + + name + Layout1 + + + + margin + 0 + + + spacing + 6 + + + QLabel + + name + TextLabel1_4 + + + text + Host + + + + QComboBox + + + text + localhost + + + + name + gpsdHost + + + enabled + false + + + editable + true + + + currentItem + 0 + + + + QLabel + + name + TextLabel2_2 + + + text + : + + + + QSpinBox + + name + gpsdPort + + + enabled + false + + + maxValue + 65535 + + + minValue + 1024 + + + value + 2947 + + + + + + QCheckBox + + name + startGPS + + + text + Start gpsd on localhost + + + + QLineEdit + + name + commandGPS + + + enabled + false + + + text + gpsd -p /dev/ttyS3 -s 57600 + + + + + name + Spacer4_2 + + + orientation + Vertical + + + sizeType + Expanding + + + sizeHint + + 20 + 20 + + + + + + diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp index bb46dd7..ca9851c 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.cpp +++ b/noncore/net/wellenreiter/gui/mainwindow.cpp @@ -422,16 +422,18 @@ void WellenreiterMainWindow::uploadSession() rhost_info = (struct hostent *) ::gethostbyname( CAP_hostname ); if ( rhost_info ) { - if ( !QFile::exists( "/var/log/dump.wellenreiter" ) ) + + + if ( !QFile::exists( mw->captureFileName() ) ) { - QMessageBox::warning( 0, tr( "Error" ), tr( "

Logfile doesn't exist

") ); + QMessageBox::warning( 0, tr( "Error" ), tr( "

Logfile '%1' doesn't exist

").arg( mw->captureFileName() ) ); return; } - QFile f( "/var/log/dump.wellenreiter" ); + QFile f( mw->captureFileName() ); if ( !f.open( IO_ReadOnly ) ) { - QMessageBox::warning( 0, tr( "Error" ), tr( "

Can't open Logfile

") ); + QMessageBox::warning( 0, tr( "Error" ), tr( "

Can't open Logfile '%1'

").arg( mw->captureFileName() ) ); return; } @@ -481,7 +483,7 @@ void WellenreiterMainWindow::uploadSession() "\r\n" "%3\r\n" "-----------------------------97267758015830030481215568065\r\n" - "Content-Disposition: form-data; name=\"upfile\"; filename=\"/var/log/dump.wellenreiter\"\r\n" + "Content-Disposition: form-data; name=\"upfile\"; filename=\"%4\"\r\n" "Content-Type: application/octet-stream\r\n" "\r\n"; @@ -491,6 +493,7 @@ void WellenreiterMainWindow::uploadSession() content = content.arg( from->text().isEmpty() ? QString( "Anonymous Wellenreiter II User" ) : from->text() ); content = content.arg( location->text().isEmpty() ? QString( "Anonymous Wellenreiter II Location" ) : location->text() ); content = content.arg( comments->text().isEmpty() ? QString( "Anonymous Wellenreiter II Comments" ) : comments->text() ); + content = content.arg( mw->captureFileName() ); header = header.arg( QString::number( content.length() + f.size() + preambel.length() ) ); diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index ec89f1e..9255a6d 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp @@ -507,7 +507,6 @@ void Wellenreiter::startClicked() // open pcap and start sniffing - QString dumpname; if ( configwindow->writeCaptureFile->isChecked() ) // write to a user specified capture file? { dumpname = configwindow->captureFileName->text(); diff --git a/noncore/net/wellenreiter/gui/wellenreiter.h b/noncore/net/wellenreiter/gui/wellenreiter.h index d882500..58dd1fd 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.h +++ b/noncore/net/wellenreiter/gui/wellenreiter.h @@ -51,6 +51,7 @@ class Wellenreiter : public WellenreiterBase { MLogWindow* logWindow() const { return logwindow; }; MHexWindow* hexWindow() const { return hexwindow; }; bool isDaemonRunning() const { return sniffing; }; + QString captureFileName() const { return dumpname; }; public: bool sniffing; @@ -88,6 +89,7 @@ class Wellenreiter : public WellenreiterBase { OSystem _system; // Opie Operating System identifier #endif + QString dumpname; OWirelessNetworkInterface* iface; OPacketCapturer* pcap; WellenreiterConfigWindow* configwindow; -- cgit v0.9.0.2