[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/dcop
From: Ravikiran Rajagopal <ravi () kde ! org>
Date: 2004-05-04 18:17:18
Message-ID: 20040504181718.B14129A83 () office ! kde ! org
[Download RAW message or body]
CVS commit by ravi:
Extend Zack's commit to allow logging on multiple machines with an NFS mounted HOME.
M +10 -1 dcopserver.cpp 1.165
--- kdelibs/dcop/dcopserver.cpp #1.164:1.165
@@ -46,9 +46,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE
#include <limits.h>
#endif
+#ifdef DCOP_LOG
+#include <string.h>
+#endif
#define QT_CLEAN_NAMESPACE 1
#include <qfile.h>
#include <qtextstream.h>
+#ifdef DCOP_LOG
#include <qdir.h>
+#endif DCOP_LOG
#include <qdatastream.h>
#include <qptrstack.h>
@@ -1043,5 +1048,9 @@ DCOPServer::DCOPServer(bool _suicide)
#ifdef DCOP_LOG
- m_logger = new QFile( QString( "%1/.dcop.log" ).arg( QDir::homeDirPath() ) );
+ char hostname_buffer[256];
+ memset( hostname_buffer, 0, sizeof( hostname_buffer ) );
+ if ( gethostname( hostname_buffer, 255 ) < 0 )
+ hostname_buffer[0] = '\0';
+ m_logger = new QFile( QString( "%1/.dcop-%2.log" ).arg( QDir::homeDirPath() \
).arg( hostname_buffer ) ); if ( m_logger->open( IO_WriteOnly ) ) {
m_stream = new QTextStream( m_logger );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic