OSI/AS Programming Manual
Releasing a Connection
APS Procedures Programming Concepts
056783 Tandem Computers Incorporated 2–51
3. Next, to be able to receive a release confirm event, call APS_EVENT_RECEIVE_.
In wait mode, this procedure returns a status code of ZAPS-VAL-STATUS-EVENT
when you have received an event.
4. If the connection is in nowait mode, call MFM_AWAITIOX_ to wait for the
completion of the procedure and to obtain the status code. As above, a status code
of ZAPS-VAL-STATUS-EVENT means you have received an event.
5. If you have received an event, call APS_STATUS_ to find out which event it is. If
the event code is ZAPS-VAL-EVT-RELEASE-CNF, you have received a release
confirm. (If the event code is some other value, see Table 2-2 for the next
procedure to call.)
6. To obtain the remote application’s response to your release request, call
APS_ASSOC_GETPARAM_. If
release-result
has the value
ZAPS-VAL-RLS-ACCEPT, the remote application has accepted the release.
7. To receive the user data, if any, from the release confirm, call the
APS_DATA_GETPARAM_ procedure.
8. If the remote application has accepted the release, call APS_DISCARD_ to discard
the context information for the connection and release the CEPI.
9. Finally, if you are using a static subdevice and do not want to reuse it, call the
APS_SUBDEVICE_DISCARD_ procedure.
Responding to a Release
Indication
If the remote application wishes to release the connection, you receive a release
indication. If the negotiated release functional unit is in use, you can accept or reject
the release. If negotiated release is not in use, you must agree to release the
connection.
Table 2-20 gives the sequence of procedure calls for a release response. The procedure
calls in square brackets can sometimes be omitted, depending on the context. The
sequence of procedures is explained after the table.
Table 2-20. Sequence of Procedures for Release Response
Procedure What You’re Asking OSI/AS
APS_EVENT_RECEIVE_ Give me the next event.
[ MFM_AWAITIOX_ ] (Nowait) Await completion; check status.
APS_STATUS_ Which event have I received?
[ APS_ASSOC_GETPARAM_ ]* What is the release reason?
APS_DATA_GETPARAM_ Give me the release indication data.
APS_ASSOC_RELEASERSP_ Respond; optionally send data.
[ MFM_AWAITIOX_ ] (Nowait) Await completion; check status.
[ APS_DISCARD_ ] (Accepting) Discard connection context.
[ APS_SUBDEVICE_DISCARD_ ] (For static subdevices only) Delete the subdevice.
* ACSE connections only.