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) (unidiff)
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) (show whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/configbase.ui122
-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, 79 insertions, 59 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 @@
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>286</width> 14 <width>303</width>
15 <height>345</height> 15 <height>343</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
@@ -59,7 +59,7 @@
59 <vbox> 59 <vbox>
60 <property stdset="1"> 60 <property stdset="1">
61 <name>margin</name> 61 <name>margin</name>
62 <number>11</number> 62 <number>6</number>
63 </property> 63 </property>
64 <property stdset="1"> 64 <property stdset="1">
65 <name>spacing</name> 65 <name>spacing</name>
@@ -706,7 +706,7 @@
706 <vbox> 706 <vbox>
707 <property stdset="1"> 707 <property stdset="1">
708 <name>margin</name> 708 <name>margin</name>
709 <number>11</number> 709 <number>6</number>
710 </property> 710 </property>
711 <property stdset="1"> 711 <property stdset="1">
712 <name>spacing</name> 712 <name>spacing</name>
@@ -773,6 +773,10 @@
773 <cstring>GroupBox4_2</cstring> 773 <cstring>GroupBox4_2</cstring>
774 </property> 774 </property>
775 <property stdset="1"> 775 <property stdset="1">
776 <name>enabled</name>
777 <bool>false</bool>
778 </property>
779 <property stdset="1">
776 <name>title</name> 780 <name>title</name>
777 <string>Action On Detecting</string> 781 <string>Action On Detecting</string>
778 </property> 782 </property>
@@ -856,7 +860,7 @@
856 <grid> 860 <grid>
857 <property stdset="1"> 861 <property stdset="1">
858 <name>margin</name> 862 <name>margin</name>
859 <number>11</number> 863 <number>6</number>
860 </property> 864 </property>
861 <property stdset="1"> 865 <property stdset="1">
862 <name>spacing</name> 866 <name>spacing</name>
@@ -1066,20 +1070,46 @@
1066 <name>title</name> 1070 <name>title</name>
1067 <string>GPS</string> 1071 <string>GPS</string>
1068 </attribute> 1072 </attribute>
1069 <widget> 1073 <grid>
1074 <property stdset="1">
1075 <name>margin</name>
1076 <number>5</number>
1077 </property>
1078 <property stdset="1">
1079 <name>spacing</name>
1080 <number>4</number>
1081 </property>
1082 <widget row="0" column="0" >
1070 <class>QLayoutWidget</class> 1083 <class>QLayoutWidget</class>
1071 <property stdset="1"> 1084 <property stdset="1">
1072 <name>name</name> 1085 <name>name</name>
1073 <cstring>Layout1</cstring> 1086 <cstring>Layout6</cstring>
1074 </property> 1087 </property>
1088 <vbox>
1075 <property stdset="1"> 1089 <property stdset="1">
1076 <name>geometry</name> 1090 <name>margin</name>
1077 <rect> 1091 <number>0</number>
1078 <x>10</x> 1092 </property>
1079 <y>40</y> 1093 <property stdset="1">
1080 <width>216</width> 1094 <name>spacing</name>
1081 <height>27</height> 1095 <number>6</number>
1082 </rect> 1096 </property>
1097 <widget>
1098 <class>QCheckBox</class>
1099 <property stdset="1">
1100 <name>name</name>
1101 <cstring>enableGPS</cstring>
1102 </property>
1103 <property stdset="1">
1104 <name>text</name>
1105 <string>Enable GPS logging w/ gpsd</string>
1106 </property>
1107 </widget>
1108 <widget>
1109 <class>QLayoutWidget</class>
1110 <property stdset="1">
1111 <name>name</name>
1112 <cstring>Layout1</cstring>
1083 </property> 1113 </property>
1084 <hbox> 1114 <hbox>
1085 <property stdset="1"> 1115 <property stdset="1">
@@ -1163,69 +1193,55 @@
1163 </hbox> 1193 </hbox>
1164 </widget> 1194 </widget>
1165 <widget> 1195 <widget>
1166 <class>QLineEdit</class> 1196 <class>QCheckBox</class>
1167 <property stdset="1"> 1197 <property stdset="1">
1168 <name>name</name> 1198 <name>name</name>
1169 <cstring>commandGPS</cstring> 1199 <cstring>startGPS</cstring>
1170 </property>
1171 <property stdset="1">
1172 <name>enabled</name>
1173 <bool>false</bool>
1174 </property>
1175 <property stdset="1">
1176 <name>geometry</name>
1177 <rect>
1178 <x>10</x>
1179 <y>110</y>
1180 <width>210</width>
1181 <height>22</height>
1182 </rect>
1183 </property> 1200 </property>
1184 <property stdset="1"> 1201 <property stdset="1">
1185 <name>text</name> 1202 <name>text</name>
1186 <string>gpsd -p /dev/ttyS3 -s 57600</string> 1203 <string>Start gpsd on localhost</string>
1187 </property> 1204 </property>
1188 </widget> 1205 </widget>
1189 <widget> 1206 <widget>
1190 <class>QCheckBox</class> 1207 <class>QLineEdit</class>
1191 <property stdset="1"> 1208 <property stdset="1">
1192 <name>name</name> 1209 <name>name</name>
1193 <cstring>enableGPS</cstring> 1210 <cstring>commandGPS</cstring>
1194 </property> 1211 </property>
1195 <property stdset="1"> 1212 <property stdset="1">
1196 <name>geometry</name> 1213 <name>enabled</name>
1197 <rect> 1214 <bool>false</bool>
1198 <x>10</x>
1199 <y>10</y>
1200 <width>199</width>
1201 <height>21</height>
1202 </rect>
1203 </property> 1215 </property>
1204 <property stdset="1"> 1216 <property stdset="1">
1205 <name>text</name> 1217 <name>text</name>
1206 <string>Enable GPS logging w/ gpsd</string> 1218 <string>gpsd -p /dev/ttyS3 -s 57600</string>
1207 </property> 1219 </property>
1208 </widget> 1220 </widget>
1209 <widget> 1221 <spacer>
1210 <class>QCheckBox</class> 1222 <property>
1211 <property stdset="1">
1212 <name>name</name> 1223 <name>name</name>
1213 <cstring>startGPS</cstring> 1224 <cstring>Spacer4_2</cstring>
1214 </property> 1225 </property>
1215 <property stdset="1"> 1226 <property stdset="1">
1216 <name>geometry</name> 1227 <name>orientation</name>
1217 <rect> 1228 <enum>Vertical</enum>
1218 <x>10</x>
1219 <y>80</y>
1220 <width>171</width>
1221 <height>21</height>
1222 </rect>
1223 </property> 1229 </property>
1224 <property stdset="1"> 1230 <property stdset="1">
1225 <name>text</name> 1231 <name>sizeType</name>
1226 <string>Start gpsd on localhost</string> 1232 <enum>Expanding</enum>
1233 </property>
1234 <property>
1235 <name>sizeHint</name>
1236 <size>
1237 <width>20</width>
1238 <height>20</height>
1239 </size>
1227 </property> 1240 </property>
1241 </spacer>
1242 </vbox>
1228 </widget> 1243 </widget>
1244 </grid>
1229 </widget> 1245 </widget>
1230 </widget> 1246 </widget>
1231 </grid> 1247 </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()
422 rhost_info = (struct hostent *) ::gethostbyname( CAP_hostname ); 422 rhost_info = (struct hostent *) ::gethostbyname( CAP_hostname );
423 if ( rhost_info ) 423 if ( rhost_info )
424 { 424 {
425 if ( !QFile::exists( "/var/log/dump.wellenreiter" ) ) 425
426
427 if ( !QFile::exists( mw->captureFileName() ) )
426 { 428 {
427 QMessageBox::warning( 0, tr( "Error" ), tr( "<p>Logfile doesn't exist</p>") ); 429 QMessageBox::warning( 0, tr( "Error" ), tr( "<p>Logfile '%1' doesn't exist</p>").arg( mw->captureFileName() ) );
428 return; 430 return;
429 } 431 }
430 432
431 QFile f( "/var/log/dump.wellenreiter" ); 433 QFile f( mw->captureFileName() );
432 if ( !f.open( IO_ReadOnly ) ) 434 if ( !f.open( IO_ReadOnly ) )
433 { 435 {
434 QMessageBox::warning( 0, tr( "Error" ), tr( "<p>Can't open Logfile</p>") ); 436 QMessageBox::warning( 0, tr( "Error" ), tr( "<p>Can't open Logfile '%1'</p>").arg( mw->captureFileName() ) );
435 return; 437 return;
436 } 438 }
437 439
@@ -481,7 +483,7 @@ void WellenreiterMainWindow::uploadSession()
481 "\r\n" 483 "\r\n"
482 "%3\r\n" 484 "%3\r\n"
483 "-----------------------------97267758015830030481215568065\r\n" 485 "-----------------------------97267758015830030481215568065\r\n"
484 "Content-Disposition: form-data; name=\"upfile\"; filename=\"/var/log/dump.wellenreiter\"\r\n" 486 "Content-Disposition: form-data; name=\"upfile\"; filename=\"%4\"\r\n"
485 "Content-Type: application/octet-stream\r\n" 487 "Content-Type: application/octet-stream\r\n"
486 "\r\n"; 488 "\r\n";
487 489
@@ -491,6 +493,7 @@ void WellenreiterMainWindow::uploadSession()
491 content = content.arg( from->text().isEmpty() ? QString( "Anonymous Wellenreiter II User" ) : from->text() ); 493 content = content.arg( from->text().isEmpty() ? QString( "Anonymous Wellenreiter II User" ) : from->text() );
492 content = content.arg( location->text().isEmpty() ? QString( "Anonymous Wellenreiter II Location" ) : location->text() ); 494 content = content.arg( location->text().isEmpty() ? QString( "Anonymous Wellenreiter II Location" ) : location->text() );
493 content = content.arg( comments->text().isEmpty() ? QString( "Anonymous Wellenreiter II Comments" ) : comments->text() ); 495 content = content.arg( comments->text().isEmpty() ? QString( "Anonymous Wellenreiter II Comments" ) : comments->text() );
496 content = content.arg( mw->captureFileName() );
494 497
495 header = header.arg( QString::number( content.length() + f.size() + preambel.length() ) ); 498 header = header.arg( QString::number( content.length() + f.size() + preambel.length() ) );
496 499
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()
507 507
508 // open pcap and start sniffing 508 // open pcap and start sniffing
509 509
510 QString dumpname;
511 if ( configwindow->writeCaptureFile->isChecked() ) // write to a user specified capture file? 510 if ( configwindow->writeCaptureFile->isChecked() ) // write to a user specified capture file?
512 { 511 {
513 dumpname = configwindow->captureFileName->text(); 512 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 {
51 MLogWindow* logWindow() const { return logwindow; }; 51 MLogWindow* logWindow() const { return logwindow; };
52 MHexWindow* hexWindow() const { return hexwindow; }; 52 MHexWindow* hexWindow() const { return hexwindow; };
53 bool isDaemonRunning() const { return sniffing; }; 53 bool isDaemonRunning() const { return sniffing; };
54 QString captureFileName() const { return dumpname; };
54 55
55 public: 56 public:
56 bool sniffing; 57 bool sniffing;
@@ -88,6 +89,7 @@ class Wellenreiter : public WellenreiterBase {
88 OSystem _system; // Opie Operating System identifier 89 OSystem _system; // Opie Operating System identifier
89 #endif 90 #endif
90 91
92 QString dumpname;
91 OWirelessNetworkInterface* iface; 93 OWirelessNetworkInterface* iface;
92 OPacketCapturer* pcap; 94 OPacketCapturer* pcap;
93 WellenreiterConfigWindow* configwindow; 95 WellenreiterConfigWindow* configwindow;