User Tools

Site Tools


Sidebar

Table Of Contents

endurox:v8.0.x:api:xatmi:tpgetcallinfo.3

tpgetcallinfo

Name

tpgetcallinfo — Read the associated call headers

Synopsis

#include <atmi.h>

int tpgetcallinfo(const char *msg, UBFH **cibuf, long flags);

Link with -latmisrv|-latmisrvnomain|-latmisrvinteg -latmi -lubf -lnstd -lpthread -lrt -lm

DESCRIPTION

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).

Valid flags

TPCI_NOEOFERR Do not generate TPESYSTEM error in case if no call info buffer is associated with the msg. Instead return 0. In case if buffer found, return value is 1.

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.

RETURN VALUE

If flag TPCI_NOEOFERR is not used: On success, tpgetcallinfo() returns zero; on error, -1 is returned, with tperrno set to indicate the error.

If flag TPCI_NOEOFERR is used: On success tpgetcallinfo() returns 1; If no call information is associated with the msg buffer, returns 0; on other error, -1 is returned, with tperrno set to indicate the error.

ERRORS

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.

EXAMPLE

See atmitest/test000_system/atmiunit0.c for sample code.

BUGS

Report bugs to support@mavimax.com

COPYING

© Mavimax, Ltd