[OpenSIPS-Devel] [OpenSIPS/opensips] 206af7: Preprocessor: Proper fix for the issue behind f1fb...

Liviu Chircu noreply at github.com
Mon May 6 14:30:54 EDT 2019


  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 206af742fbb4119304f110037dd8c97e8439d688
      https://github.com/OpenSIPS/opensips/commit/206af742fbb4119304f110037dd8c97e8439d688
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2019-05-06 (Mon, 06 May 2019)

  Changed paths:
    M cfg_pp.c

  Log Message:
  -----------
  Preprocessor: Proper fix for the issue behind f1fb2bd339

The actual issue was related to the fact that most stream-oriented GNU
tools (cat, sed, m4, etc.) work by managing a continuous flow of reads
from the input source and writes to the output one, until the input file
ending is reached.  This technique allows large amounts of data to be
transformed without requiring any intermediary, equally large buffers.

This patch creates the matching write/read looping logic into OpenSIPS,
as it both feeds these preprocessing tools with the config file input,
and consumes their output, unlocking them to process more bytes.

Thanks to Răzvan Crainea for spotting the problem!





More information about the Devel mailing list