HomeClusterLabs Projects

Low: libcrmcommon: Fix error logging in mainloop_add_ipc_server_with_prio.

Description

Low: libcrmcommon: Fix error logging in mainloop_add_ipc_server_with_prio.

If qb_ipcs_create returns NULL, nothing will have set rc so the error
message will be something nonsensical where we print out that there was
an error, but the error string is that there was no error.

Instead, check errno. qb_ipcs_create returns NULL only if calloc fails
at the moment, in which case error will be set and we can use that to
get the correct error message.

Details

Provenance
clumensAuthored on Aug 25 2023, 4:58 PM
Parents
rPeeb86af82ca5: Refactor: tools: Remove direct calls to crm_perror.
Branches
Unknown
Tags
Unknown