HomeClusterLabs Projects

Fix: libcrmcommon: pcmk__xml_read() recovery works for stdin

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

Fix: libcrmcommon: pcmk__xml_read() recovery works for stdin

Regression introduced in 2.1.7 by 596297a.

Previously, if pcmk__xml_read() was called with an argument of NULL or
"-", we told libxml2 to read from stdin's file descriptor and parse XML
from it. If this failed, we tried the same thing again.

The problem is that the data from stdin has already been read and
discarded on the first attempt. So the second attempt with
XML_PARSE_RECOVER finds an empty document.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Feb 9 2024, 3:43 PM

Commit No Longer Exists

This commit no longer exists in the repository.