fixed mantis 350

This commit is contained in:
Jeff Hill
2009-07-17 23:50:07 +00:00
parent b6a22aa844
commit a55e69113e
2 changed files with 25 additions and 2 deletions
+23 -2
View File
@@ -81,8 +81,10 @@ casStrmClient::casStrmClient ( caServerI & cas, clientBufMemoryManager & mgrIn )
pUserName ( 0 ),
pHostName ( 0 ),
incommingBytesToDrain ( 0 ),
pendingResponseStatus ( S_cas_success ),
minor_version_number ( 0 ),
payloadNeedsByteSwap ( true )
payloadNeedsByteSwap ( true ),
responseIsPending ( false )
{
this->pHostName = new char [1u];
*this->pHostName = '\0';
@@ -995,6 +997,19 @@ caStatus casStrmClient::writeNotifyAction (
if ( status != ECA_NORMAL ) {
return casStrmClient::writeNotifyResponseECA_XXX ( guard, *mp, status );
}
// dont allow a request that completed with the service in the
// past, but was incomplete because no response was sent be
// executed twice with the service
if ( this->responseIsPending ) {
int status = this->writeNotifyResponse ( guard, *pChan,
*mp, this->pendingResponseStatus );
if ( status == S_cas_success ) {
this->pendingResponseStatus = S_cas_success;
this->responseIsPending = false;
}
return status;
}
//
// verify write access
@@ -1021,7 +1036,13 @@ caStatus casStrmClient::writeNotifyAction (
pChan->getPVI().addItemToIOBLockedList(*this);
}
else {
status = casStrmClient::writeNotifyResponse ( guard, *pChan, *mp, status );
int writeNotifyServiceStatus = status;
status = this->writeNotifyResponse (
guard, *pChan, *mp, status );
if ( status != S_cas_success ) {
this->pendingResponseStatus = writeNotifyServiceStatus;
this->responseIsPending = true;
}
}
return status;
+2
View File
@@ -63,8 +63,10 @@ private:
char * pUserName;
char * pHostName;
unsigned incommingBytesToDrain;
int pendingResponseStatus;
ca_uint16_t minor_version_number;
bool payloadNeedsByteSwap;
bool responseIsPending;
caStatus createChannel ( const char * pName );
caStatus verifyRequest ( casChannelI * & pChan );