|
|
|
|
The TP_ENDED verb is issued by both the invoking and the invoked TPs. It notifies APPC that the TP is ending. In response to this verb, APPC frees the resources used by the TP.
If an APPC conversation is still in progress, TP_ENDED performs the
function of the [MC_]DEALLOCATE verb with dealloc_type
set to
The definition of the VCB structure for the TP_ENDED verb is as follows:
typedef struct tp_ended
{
AP_UINT16 opcode;
unsigned char opext; /* Reserved */
unsigned char format; /* Reserved */
AP_UINT16 primary_rc;
AP_UINT32 secondary_rc;
unsigned char tp_id[8];
unsigned char type;
} TP_ENDED;
The definition of the VCB structure for the TP_ENDED verb is as follows:
typedef struct tp_ended
{
unsigned short opcode;
unsigned char opext;
unsigned char reserv2;
unsigned short primary_rc;
unsigned long secondary_rc;
unsigned char tp_id[8];
unsigned char type;
} TP_ENDED;
The TP supplies the following parameters to APPC:
Identifier for the local TP.
The value of this parameter was returned by the TP_STARTED verb for the invoking TP or by the RECEIVE_ALLOCATE verb for the invoked TP.
Specifies how to end the TP. Possible values are:
If any APPC conversations are active, APPC performs the function of the [MC_]DEALLOCATE verb for each conversation, in order to inform the partner TP that the conversation has ended. The TP_ENDED verb does not return until [MC_]DEALLOCATE has completed.
APPC closes all sessions used by the TP, and TP_ENDED returns immediately.
After the verb executes, APPC returns parameters to indicate whether the execution was successful and, if not, to indicate the reason the execution was not successful.
If the verb executes successfully, APPC returns the following parameter:
AP_OK
APPC does not return a secondary_rc when the verb executes successfully.
If the verb does not execute successfully, APPC returns a primary return code parameter to indicate the type of error and a secondary return code parameter to provide specific details about the reason for unsuccessful execution.
If the verb does not execute because of a parameter error, APPC returns the following parameters:
AP_PARAMETER_CHECK
Possible values are:
APPC did not recognize the tp_id as an assigned TP identifier.
The value of the type parameter was not valid.
The reserved parameter format was set to a nonzero value.
The application issued this verb within a callback routine, using the synchronous APPC entry point. Any verb issued from a callback routine must use the asynchronous entry point.
No state check errors occur for this verb.
If the verb does not execute because other conditions exist, APPC returns primary return codes (and, if applicable, secondary return codes). For information about these return codes, see Common Return Codes.
Possible return codes are:
APPC does not return secondary return codes with these primary return codes.
The conversation (or conversations, if the TP is involved in more than one) can be in any state when the TP issues this verb.
After successful execution (primary_rc is AP_OK), there is no APPC state.
|
|
|
|
|