Skip to content
Start free evaluation

pdcomm_gem_spool_configure_local

Function

Replaces the local spool policy and stream/function selection.

PdcommStatus pdcomm_gem_spool_configure_local(PdcommTcpEndpoint *endpoint, const PdcommGemSpoolPolicy *policy, const PdcommGemSpoolSelection *selections, size_t count, PdcommGemSpoolWriteInfo *info)

Declared in: #include <pdcomm_gem_spooling.h>

Requires a stopped endpoint and no transmission run, in-flight delivery, or pending dequeue. The change affects future captures only; existing entries are kept. An empty selection (NULL and a zero count) disables spooling for every stream. The global enabled flag is independent of the selection. The change is installed in the spool store and invalidates synchronization, so call pdcomm_gem_spool_sync() again before capturing.

Parameters

NameDescription
endpointStopped endpoint with an Equipment spool.
policyNew policy with struct_size set.
selectionsArray of count stream selections. Every stream and listed function must be in the catalog; streams and functions must not repeat. May be NULL when count is 0.
countNumber of selections; at most max_streams.
infoReceives the outcome (#PDCOMM_GEM_SPOOL_CONFIGURED). Must not be NULL.

Returns

#PDCOMM_OK or #PDCOMM_SPOOL_UNCONFIRMED when installed; #PDCOMM_INVALID_ARGUMENT for NULL or short structures, enabled above 1, an unknown overflow policy, NULL arrays with nonzero lengths, or a selection that is duplicated or not in the catalog; #PDCOMM_LIMIT_EXCEEDED when a selection limit is exceeded; #PDCOMM_INVALID_STATE when the endpoint is not stopped or has no Equipment spool; #PDCOMM_BACKPRESSURE when a staged TCP event is pending or a delivery, dequeue, or transmission run is pending; #PDCOMM_IO_ERROR or another persistence error when the snapshot could not be installed (state unchanged); #PDCOMM_ALLOCATION_FAILED or #PDCOMM_POISONED.