[Libreoffice-commits] .: patches/dev300
Jan Holesovsky
kendy at kemper.freedesktop.org
Fri Oct 15 02:44:18 PDT 2010
patches/dev300/apply | 7 -
patches/dev300/lockfile-dont-do-dns-lookup.diff | 112 ------------------
patches/dev300/lockfile-less-symbols.diff | 148 ------------------------
3 files changed, 267 deletions(-)
New commits:
commit d95c5db0750f11c0ebd6900cf3eec0eee68d9f3a
Author: Jan Holesovsky <kendy at suse.cz>
Date: Fri Oct 15 11:43:22 2010 +0200
lockfile-* patches moved to LO.
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 3900cf2..a8dbc8d 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -1968,13 +1968,6 @@ sw-nested-positionned-tables-ww8-import-fix.diff, n#376688, flr
# FIXME dev300-m83 xmloff_dis26300_conformance.diff, n#396280, flr
-# don't do dns lookup on startup
-# TODO file up-stream
-lockfile-dont-do-dns-lookup.diff, n#389257, jholesov
-# and don't expose unnecessary symbols
-# TODO file up-stream
-lockfile-less-symbols.diff, jholesov
-
[ WWInProgress ]
sw_layout_in_table_cell_fix.diff, n#367341, flr
sw-team-pane.diff
diff --git a/patches/dev300/lockfile-dont-do-dns-lookup.diff b/patches/dev300/lockfile-dont-do-dns-lookup.diff
deleted file mode 100644
index a9df2d3..0000000
--- a/patches/dev300/lockfile-dont-do-dns-lookup.diff
+++ /dev/null
@@ -1,112 +0,0 @@
----
- desktop/source/app/lockfile.cxx | 72 +++++++++++++++++++-------------------
- 1 files changed, 36 insertions(+), 36 deletions(-)
-
-diff --git desktop/source/app/lockfile.cxx desktop/source/app/lockfile.cxx
-index 099412c..e0466b8 100644
---- desktop/source/app/lockfile.cxx
-+++ desktop/source/app/lockfile.cxx
-@@ -33,6 +33,8 @@
- #include <tools/prewin.h>
- #include <windows.h>
- #include <tools/postwin.h>
-+#else
-+#include <unistd.h>
- #endif
- #include <sal/types.h>
- #include <osl/file.hxx>
-@@ -50,6 +52,37 @@ using namespace ::rtl;
- using namespace ::utl;
-
-
-+static rtl::OString impl_getHostname()
-+{
-+ rtl::OString aHost;
-+#ifdef WNT
-+ /*
-+ prevent windows from connecting to the net to get it's own
-+ hostname by using the netbios name
-+ */
-+ sal_Int32 sz = MAX_COMPUTERNAME_LENGTH + 1;
-+ char* szHost = new char[sz];
-+ if (GetComputerName(szHost, (LPDWORD)&sz))
-+ aHost = OString(szHost);
-+ else
-+ aHost = OString("UNKNOWN");
-+ delete[] szHost;
-+#else
-+ /* Don't do dns lookup on Linux either */
-+ sal_Char pHostName[1024];
-+
-+ if ( gethostname( pHostName, sizeof( pHostName ) - 1 ) == 0 )
-+ {
-+ pHostName[sizeof( pHostName ) - 1] = '\0';
-+ aHost = OString( pHostName );
-+ }
-+ else
-+ aHost = OString("UNKNOWN");
-+#endif
-+
-+ return aHost;
-+}
-+
- namespace desktop {
-
- // initialize static members...
-@@ -155,25 +188,9 @@ namespace desktop {
-
- ByteString aHost = aConfig.ReadKey( Hostkey() );
- ByteString aUser = aConfig.ReadKey( Userkey() );
-+
- // lockfile from same host?
-- ByteString myHost;
--#ifdef WNT
-- /*
-- prevent windows from connecting to the net to get it's own
-- hostname by using the netbios name
-- */
-- sal_Int32 sz = MAX_COMPUTERNAME_LENGTH + 1;
-- char* szHost = new char[sz];
-- if (GetComputerName(szHost, (LPDWORD)&sz))
-- myHost = OString(szHost);
-- else
-- myHost = OString("UNKNOWN");
-- delete[] szHost;
--#else
-- oslSocketResult sRes;
-- myHost = OUStringToOString(
-- SocketAddr::getLocalHostname( &sRes ), RTL_TEXTENCODING_ASCII_US );
--#endif
-+ ByteString myHost( impl_getHostname() );
- if (aHost == myHost) {
- // lockfile by same UID
- OUString myUserName;
-@@ -193,24 +210,7 @@ namespace desktop {
- aConfig.SetGroup(Group());
-
- // get information
-- ByteString aHost;
--#ifdef WNT
-- /*
-- prevent windows from connecting to the net to get it's own
-- hostname by using the netbios name
-- */
-- sal_Int32 sz = MAX_COMPUTERNAME_LENGTH + 1;
-- char* szHost = new char[sz];
-- if (GetComputerName(szHost, (LPDWORD)&sz))
-- aHost = OString(szHost);
-- else
-- aHost = OString("UNKNOWN");
-- delete[] szHost;
--#else
-- oslSocketResult sRes;
-- aHost = OUStringToOString(
-- SocketAddr::getLocalHostname( &sRes ), RTL_TEXTENCODING_ASCII_US );
--#endif
-+ ByteString aHost( impl_getHostname() );
- OUString aUserName;
- Security aSecurity;
- aSecurity.getUserName( aUserName );
---
-1.7.0.1
-
diff --git a/patches/dev300/lockfile-less-symbols.diff b/patches/dev300/lockfile-less-symbols.diff
deleted file mode 100644
index 6643da5..0000000
--- a/patches/dev300/lockfile-less-symbols.diff
+++ /dev/null
@@ -1,148 +0,0 @@
----
- desktop/source/app/lockfile.cxx | 40 ++++++++++---------------------------
- desktop/source/app/lockfile.hxx | 17 +++++++--------
- desktop/source/app/lockfile2.cxx | 10 ++++----
- 3 files changed, 24 insertions(+), 43 deletions(-)
-
-diff --git desktop/source/app/lockfile.cxx desktop/source/app/lockfile.cxx
-index e0466b8..33573d3 100644
---- desktop/source/app/lockfile.cxx
-+++ desktop/source/app/lockfile.cxx
-@@ -85,24 +85,6 @@ static rtl::OString impl_getHostname()
-
- namespace desktop {
-
-- // initialize static members...
-- // lock suffix
-- const OUString Lockfile::Suffix()
-- { return OUString::createFromAscii( "/.lock" ); }
-- // values for datafile
-- const ByteString Lockfile::Group()
-- { return ByteString( "Lockdata" ); }
-- const ByteString Lockfile::Userkey()
-- { return ByteString( "User" ); }
-- const ByteString Lockfile::Hostkey()
-- { return ByteString( "Host" ); }
-- const ByteString Lockfile::Stampkey()
-- { return ByteString( "Stamp" ); }
-- const ByteString Lockfile::Timekey()
-- { return ByteString( "Time" ); }
-- const ByteString Lockfile::IPCkey()
-- { return ByteString( "IPCServer" ); }
--
- Lockfile::Lockfile( bool bIPCserver )
- :m_bIPCserver(bIPCserver)
- ,m_bRemove(sal_False)
-@@ -111,7 +93,7 @@ namespace desktop {
- // build the file-url to use for the lock
- OUString aUserPath;
- utl::Bootstrap::locateUserInstallation( aUserPath );
-- m_aLockname = aUserPath + Suffix();
-+ m_aLockname = aUserPath + LOCKFILE_SUFFIX;
-
- // generate ID
- const int nIdBytes = 16;
-@@ -181,13 +163,13 @@ namespace desktop {
- // to assume that it is a stale lockfile which can be overwritten
- String aLockname = m_aLockname;
- Config aConfig(aLockname);
-- aConfig.SetGroup(Group());
-- ByteString aIPCserver = aConfig.ReadKey( IPCkey() );
-+ aConfig.SetGroup(LOCKFILE_GROUP);
-+ ByteString aIPCserver = aConfig.ReadKey( LOCKFILE_IPCKEY );
- if (! aIPCserver.EqualsIgnoreCaseAscii( "true" ))
- return false;
-
-- ByteString aHost = aConfig.ReadKey( Hostkey() );
-- ByteString aUser = aConfig.ReadKey( Userkey() );
-+ ByteString aHost = aConfig.ReadKey( LOCKFILE_HOSTKEY );
-+ ByteString aUser = aConfig.ReadKey( LOCKFILE_USERKEY );
-
- // lockfile from same host?
- ByteString myHost( impl_getHostname() );
-@@ -207,7 +189,7 @@ namespace desktop {
- {
- String aLockname = m_aLockname;
- Config aConfig(aLockname);
-- aConfig.SetGroup(Group());
-+ aConfig.SetGroup(LOCKFILE_GROUP);
-
- // get information
- ByteString aHost( impl_getHostname() );
-@@ -219,12 +201,12 @@ namespace desktop {
- ByteString aStamp = OUStringToOString( m_aId, RTL_TEXTENCODING_ASCII_US );
-
- // write information
-- aConfig.WriteKey( Userkey(), aUser );
-- aConfig.WriteKey( Hostkey(), aHost );
-- aConfig.WriteKey( Stampkey(), aStamp );
-- aConfig.WriteKey( Timekey(), aTime );
-+ aConfig.WriteKey( LOCKFILE_USERKEY, aUser );
-+ aConfig.WriteKey( LOCKFILE_HOSTKEY, aHost );
-+ aConfig.WriteKey( LOCKFILE_STAMPKEY, aStamp );
-+ aConfig.WriteKey( LOCKFILE_TIMEKEY, aTime );
- aConfig.WriteKey(
-- IPCkey(),
-+ LOCKFILE_IPCKEY,
- m_bIPCserver ? ByteString("true") : ByteString("false") );
- aConfig.Flush( );
- }
-diff --git desktop/source/app/lockfile.hxx desktop/source/app/lockfile.hxx
-index ad971ca..3e2761f 100644
---- desktop/source/app/lockfile.hxx
-+++ desktop/source/app/lockfile.hxx
-@@ -45,6 +45,14 @@
-
- class ByteString;
-
-+#define LOCKFILE_SUFFIX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/.lock" ) )
-+#define LOCKFILE_GROUP ByteString( "Lockdata" )
-+#define LOCKFILE_USERKEY ByteString( "User" )
-+#define LOCKFILE_HOSTKEY ByteString( "Host" )
-+#define LOCKFILE_STAMPKEY ByteString( "Stamp" )
-+#define LOCKFILE_TIMEKEY ByteString( "Time" )
-+#define LOCKFILE_IPCKEY ByteString( "IPCServer" )
-+
- namespace desktop {
-
- class Lockfile;
-@@ -71,15 +79,6 @@ namespace desktop {
- ~Lockfile(void);
-
- private:
-- // data in lockfile
-- static const ByteString Group();
-- static const ByteString Userkey();
-- static const ByteString Hostkey();
-- static const ByteString Stampkey();
-- static const ByteString Timekey();
-- static const ByteString IPCkey();
-- // lockfilename
-- static const rtl::OUString Suffix();
- bool m_bIPCserver;
- // full qualified name (file://-url) of the lockfile
- rtl::OUString m_aLockname;
-diff --git desktop/source/app/lockfile2.cxx desktop/source/app/lockfile2.cxx
-index fdeb99f..b72bc93 100644
---- desktop/source/app/lockfile2.cxx
-+++ desktop/source/app/lockfile2.cxx
-@@ -42,11 +42,11 @@ bool Lockfile_execWarning( Lockfile * that )
- // read information from lock
- String aLockname = that->m_aLockname;
- Config aConfig(aLockname);
-- aConfig.SetGroup(that->Group());
-- ByteString aHost = aConfig.ReadKey( that->Hostkey() );
-- ByteString aUser = aConfig.ReadKey( that->Userkey() );
-- ByteString aStamp = aConfig.ReadKey( that->Stampkey() );
-- ByteString aTime = aConfig.ReadKey( that->Timekey() );
-+ aConfig.SetGroup( LOCKFILE_GROUP );
-+ ByteString aHost = aConfig.ReadKey( LOCKFILE_HOSTKEY );
-+ ByteString aUser = aConfig.ReadKey( LOCKFILE_USERKEY );
-+ ByteString aStamp = aConfig.ReadKey( LOCKFILE_STAMPKEY );
-+ ByteString aTime = aConfig.ReadKey( LOCKFILE_TIMEKEY );
-
- // display warning and return response
- QueryBox aBox( NULL, DesktopResId( QBX_USERDATALOCKED ) );
---
-1.7.0.1
-
More information about the Libreoffice-commits
mailing list