
  PROCEDURE [INLINE] bai$check_caller_id
    (    file_identifier: amt$file_identifier;
         ring_attributes: amt$ring_attributes;
         operation: amt$fap_operation;
         caller_id: ost$caller_identifier;
     VAR status: ost$status);

?? PUSH (LISTEXT := ON) ??

{ The purpose of this request is to validate the callers ring attributes
{ against the proposed operation.

    status.normal := TRUE;

    CASE operation OF

*copy bac$read_requests

      IF caller_id.ring > ring_attributes.r2 THEN
        amp$set_file_instance_abnormal (file_identifier,
              ame$ring_validation_error, operation, ' ', status);
      IFEND;

*copy bac$write_requests

      IF caller_id.ring > ring_attributes.r1 THEN
        amp$set_file_instance_abnormal (file_identifier,
              ame$ring_validation_error, operation, ' ', status);
      IFEND;

*copy bac$other_requests

{
{ For these requests, validation is the same as for read requests.
{

      IF caller_id.ring > ring_attributes.r2 THEN
        amp$set_file_instance_abnormal (file_identifier,
              ame$ring_validation_error, operation, ' ', status);
      IFEND;

    ELSE
      amp$set_file_instance_abnormal (file_identifier,
            ame$improper_fap_operation, operation, 'Unknown operation.',
            status);
    CASEND;

  PROCEND bai$check_caller_id;

*copyc amp$set_file_instance_abnormal
*copyc amt$ring_attributes
*copyc ame$fap_validation_errors
*copyc ame$ring_validation_errors
*copyc ost$caller_identifier
?? POP ??
