OSI/FTAM Programming Guide

Using FTM Procedure Calls
HP NonStop OSI/FTAM Programming Guide528612-001
4-10
Terminating an Association
Terminating an Association
When you complete your communication over an association, use the
FTM_TERMINATE_REQ_ procedure to release the association.
Table 4-4 shows the sequence of procedures to call and describes the steps for the
orderly release of an association. Sometimes you can omit a procedure call associated
with a substep, depending on the context. The sequence of procedures is explained
after the table.
1. When communication is completed, call FTM_TERMINATE_REQ_.
a. If the procedure succeeds, it returns a status code of ZAPS-VAL-STATUS-OK.
If the procedure fails, it returns a different status code. To obtain the details of
an error at this stage, call APS_STATUS_.
b. If the association is in nowait mode, call MFM_AWAITIOX_ to wait for
completion of the FTM_TERMINATE_REQ_ call. MFM_AWAITIOX_ gives you
the status code for the completed procedure call. For more information on the
MFM_AWAITIOX_ procedure, refer to the OSI/FTAM Programming Reference
Manual.
c. If you call MFM_AWAITIOX_ and the status code returned is not ZAPS-VAL-
STATUS-OK, call APS_STATUS_, specifying as input the CEPI returned by the
FTM_INITIALIZE_REQ_ procedure for this association.
Table 4-4. Calls for Terminating an Association
Step Action to Take Procedure(s) to Call
1 Terminate the association with the remote
responder specified.
FTM_TERMINATE_REQ_
a. If error returned by
FTM_TERMINATE_REQ_, check status.
APS_STATUS_
b. If nowait mode, await completion of
FTM_TERMINATE_REQ_
MFM_AWAITIOX_
c. If error returned by MFM_AWAITIOX_, check
status.
APS_STATUS_
2 Get the next event. APS_EVENT_RECEIVE_
a. If nowait mode, await completion of
APS_EVENT_RECEIVE_.
MFM_AWAITIOX_
3 Check status: Is the event a terminate confirm?
Or, if APS_EVENT_RECEIVE_ returns a status
other than ZAPS-VAL-STATUS-EVENT, is there
an error?
APS_STATUS_
4 Retrieve service confirm information. FTM_TERMINATE_CNF_
5 Terminate request accepted. Discard the
association context.
APS_DISCARD_