Uploaded image for project: 'OpenAM Agents'
  1. OpenAM Agents
  2. AMAGENTS-183

Handle logical error where no reader destination is registered

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not a defect
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Web Agents
    • Labels:
      None

      Description

      This is defensive code. In the logger
      static void log_buffer_read(struct log_file *fc) {
      ...
      /* lookup file data for an instance id */
          for (i = 0; i < AM_MAX_INSTANCES; i++) {
              file = &log_handle->area->files[i];
              if (file->used && file->instance_id == block->instance_id)

      {             break;         }

          }

      /* do the actual file write op */
      log_file_write(block->data, (unsigned int) block->size, file, file_cache,
      (block->level & AM_LOG_LEVEL_AUDIT) != 0)

      If it gets through all the agent config instances (for vhosts) without a match of instance id then

      EXPECTED BEHAVIOUR
      Agent should not write to the wrong file

      ACTUAL
      It will write to the last one regardless.

      Not reproduced - seen in code review.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              alex.levin@forgerock.com Alex Levin
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: