summaryrefslogtreecommitdiff
path: root/noncore
authormickeyl <mickeyl>2003-12-15 15:16:26 (UTC)
committer mickeyl <mickeyl>2003-12-15 15:16:26 (UTC)
commit4acec249d48e57c911fc2544d92785b86d5f08d0 (patch) (side-by-side diff)
treeb1613124a5093d420cdbfba4a46b9edbf8db1712 /noncore
parent7fa223e6851a0436d7ac010117d9d31fd0444cbd (diff)
downloadopie-4acec249d48e57c911fc2544d92785b86d5f08d0.zip
opie-4acec249d48e57c911fc2544d92785b86d5f08d0.tar.gz
opie-4acec249d48e57c911fc2544d92785b86d5f08d0.tar.bz2
use current dumpname, not always /var/log/...
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/configbase.ui322
-rw-r--r--noncore/net/wellenreiter/gui/mainwindow.cpp13
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp1
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.h2
4 files changed, 179 insertions, 159 deletions
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 @@
<rect>
<x>0</x>
<y>0</y>
- <width>286</width>
- <height>345</height>
+ <width>303</width>
+ <height>343</height>
</rect>
</property>
<property stdset="1">
@@ -59,7 +59,7 @@
<vbox>
<property stdset="1">
<name>margin</name>
- <number>11</number>
+ <number>6</number>
</property>
<property stdset="1">
<name>spacing</name>
@@ -706,7 +706,7 @@
<vbox>
<property stdset="1">
<name>margin</name>
- <number>11</number>
+ <number>6</number>
</property>
<property stdset="1">
<name>spacing</name>
@@ -773,6 +773,10 @@
<cstring>GroupBox4_2</cstring>
</property>
<property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
<name>title</name>
<string>Action On Detecting</string>
</property>
@@ -856,7 +860,7 @@
<grid>
<property stdset="1">
<name>margin</name>
- <number>11</number>
+ <number>6</number>
</property>
<property stdset="1">
<name>spacing</name>
@@ -1066,166 +1070,178 @@
<name>title</name>
<string>GPS</string>
</attribute>
- <widget>
- <class>QLayoutWidget</class>
+ <grid>
<property stdset="1">
- <name>name</name>
- <cstring>Layout1</cstring>
+ <name>margin</name>
+ <number>5</number>
</property>
<property stdset="1">
- <name>geometry</name>
- <rect>
- <x>10</x>
- <y>40</y>
- <width>216</width>
- <height>27</height>
- </rect>
+ <name>spacing</name>
+ <number>4</number>
</property>
- <hbox>
- <property stdset="1">
- <name>margin</name>
- <number>0</number>
- </property>
+ <widget row="0" column="0" >
+ <class>QLayoutWidget</class>
<property stdset="1">
- <name>spacing</name>
- <number>6</number>
+ <name>name</name>
+ <cstring>Layout6</cstring>
</property>
- <widget>
- <class>QLabel</class>
+ <vbox>
<property stdset="1">
- <name>name</name>
- <cstring>TextLabel1_4</cstring>
+ <name>margin</name>
+ <number>0</number>
</property>
<property stdset="1">
- <name>text</name>
- <string>Host</string>
+ <name>spacing</name>
+ <number>6</number>
</property>
- </widget>
- <widget>
- <class>QComboBox</class>
- <item>
- <property>
+ <widget>
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>enableGPS</cstring>
+ </property>
+ <property stdset="1">
<name>text</name>
- <string>localhost</string>
+ <string>Enable GPS logging w/ gpsd</string>
</property>
- </item>
- <property stdset="1">
- <name>name</name>
- <cstring>gpsdHost</cstring>
- </property>
- <property stdset="1">
- <name>enabled</name>
- <bool>false</bool>
- </property>
- <property stdset="1">
- <name>editable</name>
- <bool>true</bool>
- </property>
- <property stdset="1">
- <name>currentItem</name>
- <number>0</number>
- </property>
- </widget>
- <widget>
- <class>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>TextLabel2_2</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>:</string>
- </property>
- </widget>
- <widget>
- <class>QSpinBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>gpsdPort</cstring>
- </property>
- <property stdset="1">
- <name>enabled</name>
- <bool>false</bool>
- </property>
- <property stdset="1">
- <name>maxValue</name>
- <number>65535</number>
- </property>
- <property stdset="1">
- <name>minValue</name>
- <number>1024</number>
- </property>
- <property stdset="1">
- <name>value</name>
- <number>2947</number>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget>
- <class>QLineEdit</class>
- <property stdset="1">
- <name>name</name>
- <cstring>commandGPS</cstring>
- </property>
- <property stdset="1">
- <name>enabled</name>
- <bool>false</bool>
- </property>
- <property stdset="1">
- <name>geometry</name>
- <rect>
- <x>10</x>
- <y>110</y>
- <width>210</width>
- <height>22</height>
- </rect>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>gpsd -p /dev/ttyS3 -s 57600</string>
- </property>
- </widget>
- <widget>
- <class>QCheckBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>enableGPS</cstring>
- </property>
- <property stdset="1">
- <name>geometry</name>
- <rect>
- <x>10</x>
- <y>10</y>
- <width>199</width>
- <height>21</height>
- </rect>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Enable GPS logging w/ gpsd</string>
- </property>
- </widget>
- <widget>
- <class>QCheckBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>startGPS</cstring>
- </property>
- <property stdset="1">
- <name>geometry</name>
- <rect>
- <x>10</x>
- <y>80</y>
- <width>171</width>
- <height>21</height>
- </rect>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Start gpsd on localhost</string>
- </property>
- </widget>
+ </widget>
+ <widget>
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout1</cstring>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel1_4</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Host</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QComboBox</class>
+ <item>
+ <property>
+ <name>text</name>
+ <string>localhost</string>
+ </property>
+ </item>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>gpsdHost</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
+ <name>editable</name>
+ <bool>true</bool>
+ </property>
+ <property stdset="1">
+ <name>currentItem</name>
+ <number>0</number>
+ </property>
+ </widget>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel2_2</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>:</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QSpinBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>gpsdPort</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
+ <name>maxValue</name>
+ <number>65535</number>
+ </property>
+ <property stdset="1">
+ <name>minValue</name>
+ <number>1024</number>
+ </property>
+ <property stdset="1">
+ <name>value</name>
+ <number>2947</number>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget>
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>startGPS</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Start gpsd on localhost</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QLineEdit</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>commandGPS</cstring>
+ </property>
+ <property stdset="1">
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>gpsd -p /dev/ttyS3 -s 57600</string>
+ </property>
+ </widget>
+ <spacer>
+ <property>
+ <name>name</name>
+ <cstring>Spacer4_2</cstring>
+ </property>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Vertical</enum>
+ </property>
+ <property stdset="1">
+ <name>sizeType</name>
+ <enum>Expanding</enum>
+ </property>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+ </widget>
+ </grid>
</widget>
</widget>
</grid>
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( "<p>Logfile doesn't exist</p>") );
+ QMessageBox::warning( 0, tr( "Error" ), tr( "<p>Logfile '%1' doesn't exist</p>").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( "<p>Can't open Logfile</p>") );
+ QMessageBox::warning( 0, tr( "Error" ), tr( "<p>Can't open Logfile '%1'</p>").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;