gtpc2map | C/C++ Language Support User's Guide |
This function accepts an incoming conversation. It returns the
conversation ID that identifies this conversation from now on.
Format
#include <tpfmap.h>
void cmaccp (unsigned char *conversation_ID,
signed int *return_code);
- conversation_ID
- This is a pointer to an 8-byte character array where the conversation ID
is returned. You must specify this conversation ID on all subsequent
functions for this conversation.
- return_code
- This is a pointer to a 4-byte field where the return code is to be
placed.
Return Codes
The following is a list of return codes that can be returned to the program
that called the cmaccp function. A complete list of the
return codes and their definitions can be found in Table 45.
- CM_OK
- CM_PRODUCT_SPECIFIC_ERROR
- CM_PROGRAM_STATE_CHECK -- No incoming conversation exists.
Programming Considerations
- You can execute this function on any I-stream.
- The program must call the cmaccp function before any other
functions for this conversation. In addition, the incoming conversation
must be accepted before any others can be allocated.
- The value returned to conversation_ID must be used on all other
TPF/APPC mapped functions called for this conversation.
- There are no characteristics that modify this function.
- The following characteristics are initialized to match the values on the
incoming conversation:
- conversation_type
- mode_name
- mode_name_length
- partner_LU_name
- partner_LU_name_length
- sync_level.
- The following characteristics are always initialized as follows:
- deallocate_type is set to
CM_DEALLOCATE_SYNC_LEVEL.
- error direction is set to CM_RECEIVE_ERROR.
- prepare_to_receive_type is set to
CM_PREP_TO_RECEIVE_SYNC_LEVEL.
- send_type is set to CM_BUFFER_DATA.
- TP_name, TP_name_length, and
return_control apply only to a cmallc call.
- If the return_code is CM_OK, the conversation enters
receive state.
- Each transaction program instance can issue only one cmaccp
(ACCEPT_CONVERSATION).
Examples
The following example accepts in incoming conversation.
#include <tpfmap.h>
unsigned char convid[8];
signed int rcode;
.
.
.
cmaccp(convid,&rcode);
.
.
.
Related Information