gtpc2mbaC/C++ Language Support User's Guide

cmsrc-Set the Return_Control Characteristic

This function sets the return_control characteristic. It overrides the default value set by the cminit function.

Format

#include   <tpfmap.h>
void       cmsrc(unsigned char *conversation_ID,
                 signed int *return_control,
                 signed int *return_code);

conversation_ID
This is a pointer to an 8-byte character array that contains the conversation ID. This conversation ID must be the ID returned by the cminit (INITIALIZE) that started this conversation.

return_control
This is a pointer to a 4-byte field that specifies when an ALLOCATE is to return control to the user. Use one of the following values:

CM_WHEN_SESSION_ALLOCATED
This value specifies that control should not be returned until a session is found for the conversation.

CM_IMMEDIATE
This value specifies that a session is to be allocated only if one is immediately available. If a session is not available, the ALLOCATE terminates with a return code of CM_UNSUCCESSFUL.

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 cmsrc function. A complete list of the return codes and their definitions can be found in Table 45.

Programming Considerations

Examples

The following example changes the return_control characteristic.

#include <tpfmap.h>
 
      unsigned char convid[8];
      signed int    control;
      signed int    rcode;
      .
      .
/* set conversation_ID with value returned from initialize */
      .
      .
cmsrc(convid,&control,&rcode);
      .                       /*  normal processing path             */
      .
      .

Related Information