This commit also reverts 2 previous attempts to fix this very rare race issue spanning back to 2009
62ce853897 Patch from MOC
3a85348cdf FS-2302 mutex added around switch_xml_toxml()
The real problem was switch_xml_toxml_buf() was actually temporarily modifying the xml structure being searialized to make it appaer to be a root structure then serializing it and restoring the pointers. This caused a non-threadsafe operation when some other thread was scanning the same xml structure.
This patch removes the modification and instead passes a new arg to switch_xml_toxml_r indicating to treat the structure as if it were a root structure.
This bug has been present since the induction of xml into FS.
Since libedit originates from NetBSD, this and other BSDs use the
official version while Linux distributions tend to use the
autotoolized fork. The official version does not install a .pc file so
we cannot rely exclusively on pkg-config for detection.
FS-6408
Signed-off-by: Travis Cross <tc@traviscross.com>
Previously we enabled libedit support opportunistically if it was
neither enabled nor disabled explicitly. But this can result in
people being confused by libedit features not being available when
they really just need to install dependencies. With this change,
we'll break on configure if libedit-dev isn't there. If the user
really wants to build without libedit they just need to explicitly
disable it.
Cc: Ken Rice <krice@freeswitch.org>
Now that all output should end in a newline, we don't need to play
tricks with getting certain escape codes out ahead of buffered output.
This updates what we tried to do in commit
991b83d23c.
This partially reverts commit
8056125077.
The issue is that sofia siptrace output doesn't end each line with a
newline. Instead it sends a separate newline afterward, which comes
in as a separate event body. With the new EL_REFRESH code in effect
the line is being cleared after the siptrace output has been written
but before that next newline comes in.
With our own refresh code this doesn't happen because of slight
differences in where the stdio buffers get flushed compared to where
the output of clear_line() ends up.
This is a bit of a clumsy workaround. But we'll fix it first, then
refactor.