HomeClusterLabs Projects

Refactor: libcrmcommon: use GIOFunc return values correctly

Description

Refactor: libcrmcommon: use GIOFunc return values correctly

mainloop_gio_callback() is used as the GIOFunc for IPC and file descriptor
mainloop sources. glib will interpret its return value as G_SOURCE_REMOVE
(a.k.a. FALSE) or G_SOURCE_CONTINUE (a.k.a. TRUE).

However our IPC and file descriptor source types have their own dispatch
functions that use any negative value to remove the source, and anything else
to keep it.

Reorganize and document the code to clearly indicate the two different usages.

Details

Provenance
kgaillotAuthored on May 4 2021, 2:46 PM
Parents
rP1bff03582182: Refactor: libcrmcommon: use GSource dispatch return values correctly
Branches
Unknown
Tags
Unknown

Event Timeline