tpunsubscribe — Unsubscribe from event
#include <atmi.h>
int tpunsubscribe (long subscription, long flags);
Link with -latmisrv|-latmisrvnomain|-latmisrvinteg -latmi -lubf -lnstd -lpthread -lrt -lm
Unsubscribe from event. The subscription value is return value from original tpsubscribe() call. If subscription is set to -1, then it will affect all events to which subscription was made by given process.
Valid flags
TPSIGRSTRT Restart the system call in progress if interrupted by signal handler. This affects only underlaying mq_* function calls.
TPNOTIME Ignore timeout setting (NDRX_TOUT env variable). Wait for reply for infinitely.
This function is available only for XATMI servers.
On success, tpunsubscribe() return number of subscriptions removed; 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.
TPEINVAL Invalid parameter is given to function. subscription < -1.
TPENOENT Event server is not available.
TPETIME Service did not reply in given time NDRX_TOUT).
TPESVCFAIL Service returned TPFAIL. This is application level failure.
TPESVCERR System level service failure. Server died during the message presence in service queue.
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.