From d4b80427b348c9a2b9afeded01f120c28560bfce Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Thu, 2 Nov 2006 11:16:58 +0000 Subject: [PATCH] INTEGRATION: CWS bserver22 (1.5.4); FILE MERGED 2006/10/23 17:49:32 kz 1.5.4.1: #141908# receive handler for queue --- automation/source/communi/communi.cxx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/automation/source/communi/communi.cxx b/automation/source/communi/communi.cxx index d79640dade14..d09147872b40 100644 --- a/automation/source/communi/communi.cxx +++ b/automation/source/communi/communi.cxx @@ -4,9 +4,9 @@ * * $RCSfile: communi.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: obo $ $Date: 2006-09-17 00:33:49 $ + * last change: $Author: vg $ $Date: 2006-11-02 12:16:58 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -89,7 +89,6 @@ SV_IMPL_PTRARR_SORT( CommunicationLinkList, CommunicationLink* ); NAMESPACE_VOS(OMutex) *pMPostUserEvent=NULL; // Notwendig, da nicht threadfest - CommunicationLinkViaSocket::CommunicationLinkViaSocket( CommunicationManager *pMan, NAMESPACE_VOS(OStreamSocket) *pSocket ) : SimpleCommunicationLinkViaSocket( pMan, pSocket ) , nConnectionClosedEventId( 0 ) @@ -97,6 +96,7 @@ CommunicationLinkViaSocket::CommunicationLinkViaSocket( CommunicationManager *pM , bShutdownStarted( FALSE ) , bDestroying( FALSE ) { + SetPutDataReceivedHdl(LINK( this, CommunicationLinkViaSocket, PutDataReceivedHdl )); if ( !pMPostUserEvent ) pMPostUserEvent = new NAMESPACE_VOS(OMutex); // this is necassary to prevent the running thread from sending the close event @@ -232,7 +232,7 @@ void CommunicationLinkViaSocket::run() { NAMESPACE_VOS(OGuard) aGuard( aMDataReceived ); NAMESPACE_VOS(OGuard) aGuard2( *pMPostUserEvent ); - nDataReceivedEventId = GetpApp()->PostUserEvent( LINK( this, CommunicationLinkViaSocket, DataReceived ) ); + mlPutDataReceived.Call(this); } } TimeValue sNochEins = {0, 1000000}; @@ -276,6 +276,11 @@ long CommunicationLinkViaSocket::DataReceived( void* EMPTYARG ) return CommunicationLink::DataReceived( ); } +IMPL_LINK( CommunicationLinkViaSocket, PutDataReceivedHdl, CommunicationLinkViaSocket*, EMPTYARG ) +{ + nDataReceivedEventId = GetpApp()->PostUserEvent( LINK( this, CommunicationLinkViaSocket, DataReceived ) ); + return 0; +}