summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-12-27 17:33:48 -0600
committerSlávek Banko <slavek.banko@axis.cz>2015-12-23 02:22:35 +0100
commitd4249423a46c849f7a6b285085293450963d136a (patch)
tree40f6e7c90aae785395b14d7434eedb1dbe07da66
parent56020808f50c23fe54619fe8274264d1005bd6a4 (diff)
downloadtdelibs-d4249423a46c849f7a6b285085293450963d136a.tar.gz
tdelibs-d4249423a46c849f7a6b285085293450963d136a.zip
Fix crash in mount/umount operations when using pmount
Remove unneeded hack in dirlister for media device root directory (cherry picked from commit a179d5d6967c204d5973fff2839a517175671b5b)
-rw-r--r--kio/kio/connection.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/kio/kio/connection.cpp b/kio/kio/connection.cpp
index b2a84a798..a76a8f7f0 100644
--- a/kio/kio/connection.cpp
+++ b/kio/kio/connection.cpp
@@ -43,6 +43,8 @@
#include <kdebug.h>
#include <tqsocketnotifier.h>
+extern char *__progname;
+
using namespace KIO;
Connection::Connection()
@@ -187,19 +189,19 @@ bool Connection::sendnow( int _cmd, const TQByteArray &data )
size_t n = fwrite( buffer, 1, 10, f_out );
if ( n != 10 ) {
- kdError(7017) << "Could not send header" << endl;
+ kdError(7017) << "Could not send header (pid " << getpid() << " process \"" << __progname << "\")" << endl;
return false;
}
n = fwrite( data.data(), 1, data.size(), f_out );
if ( n != data.size() ) {
- kdError(7017) << "Could not write data" << endl;
+ kdError(7017) << "Could not write data (pid " << getpid() << " process \"" << __progname << "\")" << endl;
return false;
}
if (fflush( f_out )) {
- kdError(7017) << "Could not write data" << endl;
+ kdError(7017) << "Could not write data (pid " << getpid() << " process \"" << __progname << "\")" << endl;
return false;
}
@@ -209,7 +211,7 @@ bool Connection::sendnow( int _cmd, const TQByteArray &data )
int Connection::read( int* _cmd, TQByteArray &data )
{
if (fd_in == -1 ) {
- kdError(7017) << "read: not yet inited" << endl;
+ kdError(7017) << "read: not yet inited (pid " << getpid() << " process \"" << __progname << "\")" << endl;
return -1;
}
@@ -221,12 +223,12 @@ int Connection::read( int* _cmd, TQByteArray &data )
goto again1;
if ( n == -1) {
- kdError(7017) << "Header read failed, errno=" << errno << endl;
+ kdError(7017) << "Header read failed, errno=" << errno << " (pid " << getpid() << " process \"" << __progname << "\")" << endl;
}
if ( n != 10 ) {
if ( n ) // 0 indicates end of file
- kdError(7017) << "Header has invalid size (" << n << ")" << endl;
+ kdError(7017) << "Header has invalid size (" << n << ") (pid " << getpid() << " process \"" << __progname << "\")" << endl;
return -1;
}
@@ -252,11 +254,11 @@ int Connection::read( int* _cmd, TQByteArray &data )
if (errno == EINTR)
continue;
- kdError(7017) << "Data read failed, errno=" << errno << endl;
+ kdError(7017) << "Data read failed, errno=" << errno << " (pid " << getpid() << " process \"" << __progname << "\")" << endl;
return -1;
}
if ( !n ) { // 0 indicates end of file
- kdError(7017) << "Connection ended unexpectedly (" << n << "/" << bytesToGo << ")" << endl;
+ kdError(7017) << "Connection ended unexpectedly (" << n << "/" << bytesToGo << ") (pid " << getpid() << " process \"" << __progname << "\")" << endl;
return -1;
}