pdcomm_gem_program_cancel_grant
Function
Cancels a grant activated by answering an S7F1.
PdcommStatus pdcomm_gem_program_cancel_grant(PdcommTcpEndpoint *endpoint, const PdcommGemResult *result)Identify the grant by the original S7F1 result, never by a matching PPID. Grants also end when an S7F3 consumes them or when the connection generation changes.
Parameters
| Name | Description |
|---|---|
endpoint | Communicating GEM endpoint that produced result. |
result | Answered S7F1 request result. |
Returns
#PDCOMM_OK when the grant was cancelled; #PDCOMM_STALE_TOKEN when the result is from another endpoint, generation, or selection, is not an answered S7F1, activated no grant, or its grant is no longer active; #PDCOMM_INVALID_STATE when the result has no program data, no program store is configured, or GEM is not Communicating; #PDCOMM_BACKPRESSURE when a staged TCP event is pending; #PDCOMM_INVALID_ARGUMENT for a NULL argument, or #PDCOMM_POISONED.