summaryrefslogtreecommitdiff
path: root/core/qws/transferserver.cpp
Side-by-side diff
Diffstat (limited to 'core/qws/transferserver.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/qws/transferserver.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/qws/transferserver.cpp b/core/qws/transferserver.cpp
index 777c384..7bf6719 100644
--- a/core/qws/transferserver.cpp
+++ b/core/qws/transferserver.cpp
@@ -1,47 +1,48 @@
/**********************************************************************
** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
**
** This file is part of the Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
/* OPIE */
#include <opie2/odebug.h>
+/* STD */
#define _XOPEN_SOURCE
#include <pwd.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <time.h>
#ifndef Q_OS_MACX
#include <shadow.h>
#endif /* Q_OS_MACX */
/* we need the _OS_LINUX stuff first ! */
#ifndef _OS_LINUX_
// Is anybody able to review this ? The include "uuid/uuid.h" couldn't be found
// anywhere ? Therfore I removed it completely..
// I think it should be made permanentyl !? (eilers)
#warning "Where should uuid/uuid.h be found ? Removed this part .. (eilers)"
#if 0
extern "C"
{
#include <uuid/uuid.h>
#define UUID_H_INCLUDED
@@ -1106,51 +1107,50 @@ void ServerDTP::connected()
file.close();
emit completed();
mode = Idle;
}
else {
if ( !file.atEnd() ) {
QCString s;
s.resize( block_size );
int bytes = file.readBlock( s.data(), block_size );
writeBlock( s.data(), bytes );
}
}
break;
case SendGzipFile:
if ( createTargzProc->isRunning() ) {
// SHOULDN'T GET HERE, BUT DOING A SAFETY CHECK ANYWAY
owarn << "Previous tar --gzip process is still running; killing it..." << oendl;
createTargzProc->kill();
}
bytes_written = 0;
odebug << "==>start send tar process" << oendl;
if ( !createTargzProc->start(Opie::Core::OProcess::NotifyOnExit, Opie::Core::OProcess::Stdout) )
- qWarning("Error starting %s or %s",
- createTargzProc->args()[0].data(),
- gzipProc->args()[0].data());
+ owarn << "Error starting " << createTargzProc->args()[0].data()
+ << " or " << gzipProc->args()[0].data() << oendl;
break;
case SendBuffer:
if ( !buf.open( IO_ReadOnly) ) {
emit failed();
mode = Idle;
return ;
}
// odebug << "Debug: Sending byte array" << oendl;
bytes_written = 0;
while ( !buf.atEnd() )
putch( buf.getch() );
buf.close();
break;
case RetrieveFile:
// retrieve file mode
if ( file.exists() && !file.remove() ) {
emit failed();
mode = Idle;
return ;
}
if ( !file.open( IO_WriteOnly) ) {
emit failed();