tpcancel — Cancel the call which was issued by tpacall().
#include <atmi.h>
int tpcancel(int cd);
For XATMI client link with -latmiclt -latmi -lubf -lnstd -lpthread -lrt -lm
For XATMI server link with -latmisrv|-latmisrvnomain|-latmisrvinteg -latmi -lubf -lnstd -lpthread -lrt -lm
Cancel the asynchronous call done by tpacall(). Basically this marks the call descriptor as un-used in internal call descriptor registry. If answer is received for such descriptor, the answer is discarded. Note that this does not abort the transaction (if started) by previous tpacall. Thus if transaction needs to be aborted, use tpabort().
On success, tpacall() return call descriptor (>0); on error, -1 is returned, with tperrno set to indicate the error.
Note that tpstrerror() returns generic error message plus custom message with debug info from last function call.
TPEBADDESC Invalid call descriptor (out of range).
TPEINVAL Enduro/X is not configured.
TPESYSTEM System failure occurred during serving. See logs i.e. user log, or debugs for more info.
TPEOS System failure occurred during serving. See logs i.e. user log, or debugs for more info.