IBM Integration Bus, Version 9.0.0.8 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

See information about the latest product version

cciGetTargetTerminalName

This function returns the name of the input terminal of the target node for the specified connection.

Syntax

CciSize  cciGetTargetTerminalName (int*           returnCode,
                                   CciConnection* connection,
                                   CciChar*       value,
                                   CciSize        length);

Parameters

returnCode (output)
Receives the return code from the function (output).
  • CCI_BUFFER_TOO_SMALL

    The provided buffer was not large enough to hold the value of node name.

connection (input)
This parameter is a handle to a connection between two nodes.
value (output)
Address of a buffer, allocated by the caller to hold the value of the terminal's name.
length
The length, in CciChars, of the buffer allocated by the caller.

Return values

  • If successful, the terminal name is copied into the supplied buffer, and the number of CciChar characters copied is returned.
  • If the buffer is not large enough to contain the terminal name, returnCode is set to CCI_BUFFER_TOO_SMALL, and the number of CciChars required is returned.

Example

void myPropagatedMessageCallback(
                        CciDataContext* userContext,
                        CciMessage*     message,
                        CciMessage*     localEnvironment,
                        CciMessage*     exceptionList,
                        CciMessage*     environment,
                        CciConnection*  connection){
   int rc = CCI_SUCCESS;
   CciChar targetTerminalName[initialStringBufferLength];
   cciGetTargetTerminalName(&rc,
                            connection,
                            targetTerminalName,
                            initialStringBufferLength);
   /*you should now check the rc for unexpected values*/
   /*if rc is CCI_BUFFER_TOO_SMALL then you should resize and retry*/

as36030_.htm | Last updated Friday, 21 July 2017