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

Liviu Chircu noreply at github.com
Tue May 7 06:43:52 EDT 2019


  Branch: refs/heads/3.0
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 016134408d3e786329becdcda644a0eda288e144
      https://github.com/OpenSIPS/opensips/commit/016134408d3e786329becdcda644a0eda288e144
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2019-05-07 (Tue, 07 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!

(cherry picked from commit 206af742fbb4119304f110037dd8c97e8439d688)





More information about the Devel mailing list