summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/wellenreiter/gui/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/mainwindow.cpp13
1 files changed, 8 insertions, 5 deletions
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
@@ -419,22 +419,24 @@ void WellenreiterMainWindow::uploadSession()
int sock = -1;
bool ok = false;
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;
}
int content_length = f.size();
::memset( &raddr, 0, sizeof (struct sockaddr_in) );
@@ -478,22 +480,23 @@ void WellenreiterMainWindow::uploadSession()
"%2\r\n"
"-----------------------------97267758015830030481215568065\r\n"
"Content-Disposition: form-data; name=\"Comments\"\r\n"
"\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";
preambel = ""
"\r\n-----------------------------97267758015830030481215568065--\r\n";
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() ) );
// write header
const char* ascii = header.latin1();