OSI/AS Programming Manual

Releasing a Connection
APS Procedures Programming Concepts
2–54 056783 Tandem Computers Incorporated
2. If the connection is in nowait mode, call MFM_AWAITIOX_ to wait for the
completion of the procedure and to obtain the status code.
3. When you have received an event, call APS_STATUS_ to find out which event it is.
If the event code is ZAPS-VAL-EVT-P-ABORT-IND, you have received a provider
abort from the Session Layer or the Presentation Layer.
APS_STATUS_ also returns additional relevant information for presentation and
ACSE connections; see the description of APS_STATUS_ in Section 3 for details.
4. To find out why the provider has aborted the connection, call
APS_ASSOC_GETPARAM_ , including
abort-reason
in the call.
For an ACSE connection, if the event code is ZAPS-VAL-EVT-U-ABORT-IND, also
include
abort-source
in the call to APS_ASSOC_GETPARAM_. If the abort
source is ZAPS-VAL-ABORT-SRC-ACSE-PROV, you have received a provider
abort from ACSE.
5. To discard the connection context information and release the CEPI, call
APS_DISCARD_.
6. Finally, if you are using a static subdevice and do not want to reuse it, call the
APS_SUBDEVICE_DISCARD_ procedure.
Remote User Abort A remote user can abort a connection at any time (as you can). Table 2-23 shows how
you are informed of a remote user abort and gives the sequence of procedures you
should call when a remote user abort occurs. The MFM_AWAITIOX_ call must be
included for a nowait connection, and must not be included for a waited connection.
The sequence of procedures is explained after the table.
Table 2-23. Sequence of Procedures to Handle a Remote User Abort
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 ACSE abort source?
APS_DATA_GETPARAM_ What data has the remote user sent?
APS_DISCARD_ Discard the connection context.
[ APS_SUBDEVICE_DISCARD_ ] (For static subdevices only) Delete the subdevice.
The following steps explain the abort sequence given in Table 2-23:
1. In the course of normal processing, you call APS_EVENT_RECEIVE_ to be
notified when you have received an event.
2. If the connection is in nowait mode, call MFM_AWAITIOX_ to wait for the
completion of the procedure and to obtain the status code.