diff options
author | Philipp Lohmann [pl] <Philipp.Lohmann@Sun.COM> | 2010-06-01 11:30:19 +0200 |
---|---|---|
committer | Philipp Lohmann [pl] <Philipp.Lohmann@Sun.COM> | 2010-06-01 11:30:19 +0200 |
commit | b1017660ecac2d0f3755544f394238fea0fc71ff (patch) | |
tree | 873fc507f3f0c4e5a99d502c90187eb0a83e5af9 /vcl/unx | |
parent | vcl112: #b6951113# be robust wrt slighly standard deviating PPD files (diff) | |
download | core-b1017660ecac2d0f3755544f394238fea0fc71ff.tar.gz core-b1017660ecac2d0f3755544f394238fea0fc71ff.zip |
vcl112: #i111972# avoid sshutdown problems in default ICE IO error handler (thanks cmc!)
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/source/app/sm.cxx | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/vcl/unx/source/app/sm.cxx b/vcl/unx/source/app/sm.cxx index dbaa278a780b..959d6af5912d 100644 --- a/vcl/unx/source/app/sm.cxx +++ b/vcl/unx/source/app/sm.cxx @@ -159,6 +159,10 @@ class ICEConnectionObserver static int nWakeupFiles[2]; static oslMutex ICEMutex; static oslThread ICEThread; +#ifdef USE_SM_EXTENSION + static IceIOErrorHandler origIOErrorHandler; + static IceErrorHandler origErrorHandler; +#endif public: static void activate(); @@ -179,6 +183,19 @@ oslMutex ICEConnectionObserver::ICEMutex = NULL; oslThread ICEConnectionObserver::ICEThread = NULL; int ICEConnectionObserver::nWakeupFiles[2] = { 0, 0 }; +#ifdef USE_SM_EXTENSION +IceIOErrorHandler ICEConnectionObserver::origIOErrorHandler = NULL; +IceErrorHandler ICEConnectionObserver::origErrorHandler = NULL; + +static void IgnoreIceErrors(IceConn, Bool, int, unsigned long, int, int, IcePointer) +{ +} + +static void IgnoreIceIOErrors(IceConn) +{ +} +#endif + // HACK bool SessionManagerClient::bDocSaveDone = false; @@ -591,6 +608,12 @@ void ICEConnectionObserver::activate() ICEMutex = osl_createMutex(); bIsWatching = TRUE; #ifdef USE_SM_EXTENSION + /* + * Default handlers call exit, we don't care that strongly if something + * happens to fail + */ + origIOErrorHandler = IceSetIOErrorHandler( IgnoreIceIOErrors ); + origErrorHandler = IceSetErrorHandler( IgnoreIceErrors ); IceAddConnectionWatch( ICEWatchProc, NULL ); #endif } @@ -604,6 +627,8 @@ void ICEConnectionObserver::deactivate() bIsWatching = FALSE; #ifdef USE_SM_EXTENSION IceRemoveConnectionWatch( ICEWatchProc, NULL ); + IceSetErrorHandler( origErrorHandler ); + IceSetIOErrorHandler( origIOErrorHandler ); #endif nConnections = 0; if( ICEThread ) |