HomeClusterLabs Projects

Refactor: libcrmcommon: functionize message creation

Description

Refactor: libcrmcommon: functionize message creation

create_request_adv() and create_reply_adv() duplicated a lot of code.
Functionize the shared code as pcmknew_message_as(), with a (currently
unused) pcmk
new_message() macro wrapper.

The new function takes a server type as an argument, and sets the message type
(PCMK__XA_T) to that server's primary message type. As of this commit, callers
pass pcmk_ipc_controld to preserve previous behavior.

Details

Provenance
kgaillotAuthored on Jul 11 2024, 2:29 PM
Parents
rPd2b540924888: Refactor: libcrmcommon: use "message" as request/reply XML element name
Branches
Unknown
Tags
Unknown