summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorJörg Budischewski <jbu@openoffice.org>2000-11-28 13:37:03 +0000
committerJörg Budischewski <jbu@openoffice.org>2000-11-28 13:37:03 +0000
commitabb19f056ffc4d1ae9c59c5659f53492731f2287 (patch)
treed040701a95e4b3508655eecdd11b24f3a7f8a9be /bridges
parent976a357bef52407fa1aaf424ad2a3bb7f568d4bc (diff)
#80758# force synchronous feature implemented
Diffstat (limited to 'bridges')
-rw-r--r--bridges/inc/bridges/remote/remote.hxx5
-rw-r--r--bridges/source/remote/static/remote.cxx53
2 files changed, 31 insertions, 27 deletions
diff --git a/bridges/inc/bridges/remote/remote.hxx b/bridges/inc/bridges/remote/remote.hxx
index 0e4aa39cd32a..10311cf7dc6d 100644
--- a/bridges/inc/bridges/remote/remote.hxx
+++ b/bridges/inc/bridges/remote/remote.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: remote.hxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 15:28:48 $
+ * last change: $Author: jbu $ $Date: 2000-11-28 14:37:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -103,6 +103,7 @@ public:
oslInterlockedCount m_nRef;
uno_Environment *m_pEnvRemote;
requestClientSideDispatcher m_dispatch;
+ oslInterlockedCount m_nReleaseRemote;
};
}
diff --git a/bridges/source/remote/static/remote.cxx b/bridges/source/remote/static/remote.cxx
index f8bb8bcb633a..47fc9384476a 100644
--- a/bridges/source/remote/static/remote.cxx
+++ b/bridges/source/remote/static/remote.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: remote.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: jbu $ $Date: 2000-10-19 14:22:25 $
+ * last change: $Author: jbu $ $Date: 2000-11-28 14:34:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -77,7 +77,8 @@ Remote2RemoteStub::Remote2RemoteStub( rtl_uString *pOid,
m_pEnvRemote( pEnvRemote ),
m_sOid( pOid ),
m_nRef( 1 ),
- m_dispatch( dispatch )
+ m_dispatch( dispatch ),
+ m_nReleaseRemote( 1 )
{
typelib_typedescription_acquire( ( typelib_TypeDescription * ) m_pType );
m_pEnvRemote->acquire( m_pEnvRemote );
@@ -94,22 +95,6 @@ Remote2RemoteStub::~Remote2RemoteStub()
{
// send a release via the connection !
- releaseRemote();
-
- typelib_typedescription_release( (typelib_TypeDescription * ) m_pType );
- m_pEnvRemote->release( m_pEnvRemote );
-#ifdef DEBUG
- thisCounter.release();
-#endif
-}
-
-
-void Remote2RemoteStub::thisFree( uno_ExtEnvironment *pEnvUno , void *pThis )
-{
- delete (Remote2RemoteStub *) pThis;
-}
-void Remote2RemoteStub::releaseRemote()
-{
sal_Bool bNeedsRelease = sal_False;
if( ! m_pType->aBase.bComplete )
{
@@ -127,17 +112,35 @@ void Remote2RemoteStub::releaseRemote()
typelib_typedescriptionreference_getDescription(
&pReleaseMethod ,
m_pType->ppAllMembers[REMOTE_RELEASE_METHOD_INDEX] );
- thisDispatch( this,
- pReleaseMethod,
- 0,
- 0,
- &pAny );
-
+ for( int i = 0 ; i < m_nReleaseRemote ; i ++ )
+ {
+ thisDispatch( this,
+ pReleaseMethod,
+ 0,
+ 0,
+ &pAny );
+ }
typelib_typedescription_release( pReleaseMethod );
if( bNeedsRelease )
{
typelib_typedescription_release( (typelib_TypeDescription * ) m_pType );
}
+
+ typelib_typedescription_release( (typelib_TypeDescription * ) m_pType );
+ m_pEnvRemote->release( m_pEnvRemote );
+#ifdef DEBUG
+ thisCounter.release();
+#endif
+}
+
+
+void Remote2RemoteStub::thisFree( uno_ExtEnvironment *pEnvUno , void *pThis )
+{
+ delete (Remote2RemoteStub *) pThis;
+}
+void Remote2RemoteStub::releaseRemote()
+{
+ osl_incrementInterlockedCount( &m_nReleaseRemote );
}
void Remote2RemoteStub::thisAcquire( remote_Interface *pThis )