Author: pescetti
Date: Tue Sep  6 19:13:44 2016
New Revision: 1759486

URL: http://svn.apache.org/viewvc?rev=1759486&view=rev
Log:
#i114963# Enable IPC before OpenClients to allow client connections when 
printing.
Patch By: aptit...@btconnect.com

Modified:
    openoffice/trunk/main/desktop/source/app/app.cxx

Modified: openoffice/trunk/main/desktop/source/app/app.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/desktop/source/app/app.cxx?rev=1759486&r1=1759485&r2=1759486&view=diff
==============================================================================
--- openoffice/trunk/main/desktop/source/app/app.cxx (original)
+++ openoffice/trunk/main/desktop/source/app/app.cxx Tue Sep  6 19:13:44 2016
@@ -2533,9 +2533,21 @@ IMPL_LINK( Desktop, OpenClients_Impl, vo
 {
     RTL_LOGFILE_PRODUCT_CONTEXT( aLog, "PERFORMANCE - 
DesktopOpenClients_Impl()" );
 
-    OpenClients();
-
-    OfficeIPCThread::SetReady();
+       // #114963#
+       // Enable IPC thread before OpenClients
+       //
+       // This is because it is possible for another client to connect during 
the OpenClients() call.
+       // This can happen on Windows when document is printed (not opened) and 
another client wants to print (when printing multiple documents).
+       // If the IPC thread is enabled after OpenClients, then the client will 
not be processed because the application will exit after printing. i.e 
OfficeIPCThread::AreRequestsPending() will always return false
+       //
+       // ALSO:
+       //
+       // Multiple clients may request simultaneous connections.
+       // When this server closes down it attempts to recreate the pipe (in 
DisableOfficeIPCThread()).
+       // It's possible that the client has a pending connection request.
+       // When the IPC thread is not running, this connection locks (because 
maPipe.accept()) is never called
+       OfficeIPCThread::SetReady();
+       OpenClients();
 
     // CloseStartupScreen();
     CloseSplashScreen();


Reply via email to