tpcancel - Cancel a call descriptor for an outstanding reply

Format

ANSI C, C++

#include <xatmi.h>
int tpcancel (int cd)

K&R C

#include <xatmi.h>
int tpcancel (cd)
int     cd;

Description

The function tpcancel() cancels a call descriptor, cd, returned by tpacall(). It is an error to attempt to cancel a call descriptor associated with a global transaction.

Upon successful return, cd is no longer valid and any reply received (by the communication resource manager) on behalf of cd is silently discarded.

<<Argument>>

<<cd

Specify a descriptor.>>

Return value

tpcancel() returns -1 on error and sets tperrno to indicate the error condition.

Errors

Under the following conditions, tpcancel() fails and sets tperrno to one of the following values:

Return valueReturn value (numeric)Explanation
TPEBADDESC2The argument cd is an invalid descriptor.
TPETRAN14The argument cd is associated with the caller's global transaction. Even after an error, the descriptor cd remains valid and the caller's current transaction is not affected.
TPEPROTO9The function tpcancel() was called in an improper context.
TPESYSTEM12A communication resource manager system error has occurred. The exact nature of the error is determined in a product-specific manner.
TPEOS7An operating system error has occurred. The exact nature of the error is determined in a product-specific manner.

See also

tpacall().

<<Notes on use with OpenTP1>>

  1. <<The behavior caused by XATMI errors encountered during OSI TP communication may be different from the behavior caused by errors encountered conventional TCP/IP communication.>>