tpgetcallinfo — Read the associated call headers
#include <atmi.h>
int tpgetcallinfo(const char msg, UBFH *cibuf, long flags);
Link with -latmisrv|-latmisrvnomain|-latmisrvinteg -latmi -lubf -lnstd -lpthread -lrt -lm
Function is used to retrieve any call header information associated with msg XATMI buffer. Both buffers msg and cibuf must be allocated by tpalloc(3) calls. The msg cannot be NULL buffer (null). cibuf most point to XATMI buffer or NULL. Once function called, any call infos are copied to cibuf (with type reallocation, if there is not enough space in cibuf or not a UBF buffer).
flags is reserved for future use, and shall be set to 0.
Call information to XATMI buffer is set by tpsetcallinfo(3) call, and is associated with msg buffer through the call path, i.e. IPC between processes, such as tpcall(3). For more details see tpsetcallinfo(3) description.
On success, tpgetcallinfo() return zero; 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 msg is NULL, msg is not XATMI buffer, flags is not 0. cibuf is NULL or not pointing to valid XATMI buffer.
TPESYSTEM No call infos are associated with msg buffer.
TPEOS System failure occurred during serving. See logs i.e. user log, or debugs for more info. Also used in cases in case of memory condition.