Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/ca/caProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ void CAClientFactory::start()

void CAClientFactory::stop()
{
// Deregister the provider. Does nothing if no "ca" provider is registered.
// Any CAChannelProvider instances already handed out stay alive until their
// references are released.
//
// Important on Windows where exit handlers are not run when main() returns.
ChannelProviderRegistry::clients()->remove("ca");
}

}}}
5 changes: 4 additions & 1 deletion src/ca/pv/caProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,14 @@ class epicsShareClass CAClientFactory
public:
/** @brief start provider ca
*
* Registers the ca provider with the client registry.
*/
static void start();
/** @brief stop provider ca
*
* This does nothing.
* Unregisters the ca provider from the client registry, undoing start().
* Any CAChannelProvider instance already handed out stays alive until its
* owners release it.
*/
static void stop();
};
Expand Down
15 changes: 9 additions & 6 deletions src/server/responseHandlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1460,6 +1460,9 @@ void ServerChannelPutRequesterImpl::send(ByteBuffer* buffer, TransportSendContro
_status.serialize(buffer, control);
}

// Call stopRequest() before serializing the payload
stopRequest();

if (_status.isSuccess())
{
if ((QOS_INIT & request) != 0)
Expand All @@ -1475,8 +1478,6 @@ void ServerChannelPutRequesterImpl::send(ByteBuffer* buffer, TransportSendContro
}
}

stopRequest();

// lastRequest
if ((QOS_DESTROY & request) != 0)
destroy();
Expand Down Expand Up @@ -1729,6 +1730,9 @@ void ServerChannelPutGetRequesterImpl::send(ByteBuffer* buffer, TransportSendCon
_status.serialize(buffer, control);
}

// Call stopRequest() before serializing the payload.
stopRequest();

if (_status.isSuccess())
{
if ((QOS_INIT & request) != 0)
Expand Down Expand Up @@ -1759,8 +1763,6 @@ void ServerChannelPutGetRequesterImpl::send(ByteBuffer* buffer, TransportSendCon
}
}

stopRequest();

// lastRequest
if ((QOS_DESTROY & request) != 0)
destroy();
Expand Down Expand Up @@ -2365,6 +2367,9 @@ void ServerChannelArrayRequesterImpl::send(ByteBuffer* buffer, TransportSendCont
_status.serialize(buffer, control);
}

// Call stopRequest() before serializing the payload.
stopRequest();

if (_status.isSuccess())
{
if ((QOS_GET & request) != 0)
Expand All @@ -2385,8 +2390,6 @@ void ServerChannelArrayRequesterImpl::send(ByteBuffer* buffer, TransportSendCont
}
}

stopRequest();

// lastRequest
if ((QOS_DESTROY & request) != 0)
destroy();
Expand Down
Loading
Loading